本文整理匯總了PHP中Axis::getLabelNumber方法的典型用法代碼示例。如果您正苦於以下問題:PHP Axis::getLabelNumber方法的具體用法?PHP Axis::getLabelNumber怎麽用?PHP Axis::getLabelNumber使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Axis
的用法示例。
在下文中一共展示了Axis::getLabelNumber方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: createGrid
protected function createGrid()
{
$max = $this->getRealYMax();
$min = $this->getRealYMin();
$number = $this->yAxis->getLabelNumber() - 1;
if ($number < 1) {
return;
}
// Horizontal lines of the grid
$h = array();
for ($i = 0; $i <= $number; $i++) {
$h[] = $i / $number;
}
// Vertical lines
$major = $this->yAxis->tick('major');
$interval = $major->getInterval();
$number = $this->getXAxisNumber() - 1;
$w = array();
if ($number > 0) {
for ($i = 0; $i <= $number; $i++) {
if ($i % $interval === 0) {
$w[] = $i / $number;
}
}
}
$this->grid->setGrid($w, $h);
}
示例2: createGrid
function createGrid()
{
// Horizontal lines of the grid
$major = $this->yAxis->tick('major');
$interval = $major->getInterval();
$number = $this->yAxis->getLabelNumber() - 1;
$h = array();
if ($number > 0) {
for ($i = 0; $i <= $number; $i++) {
$h[] = $i / $number;
}
}
// Vertical lines
$major = $this->xAxis->tick('major');
$interval = $major->getInterval();
$number = $this->xAxis->getLabelNumber() - 1;
$w = array();
if ($number > 0) {
for ($i = 0; $i <= $number; $i++) {
if ($i % $interval === 0) {
$w[] = $i / $number;
}
}
}
$this->grid->setGrid($w, $h);
}