本文整理汇总了PHP中Axis::tick方法的典型用法代码示例。如果您正苦于以下问题:PHP Axis::tick方法的具体用法?PHP Axis::tick怎么用?PHP Axis::tick使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Axis
的用法示例。
在下文中一共展示了Axis::tick方法的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);
}