當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Axis::reverseTickStyle方法代碼示例

本文整理匯總了PHP中Axis::reverseTickStyle方法的典型用法代碼示例。如果您正苦於以下問題:PHP Axis::reverseTickStyle方法的具體用法?PHP Axis::reverseTickStyle怎麽用?PHP Axis::reverseTickStyle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Axis的用法示例。


在下文中一共展示了Axis::reverseTickStyle方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: init

 function init($drawer)
 {
     list($x1, $y1, $x2, $y2) = $this->getPosition();
     $this->xAxis->line->setX($x1, $x2);
     $this->xAxis->label->setAlign(NULL, LABEL_BOTTOM);
     $this->xAxis->label->move(0, 3);
     $this->xAxis->setRange($this->extremum->left, $this->extremum->right);
     $this->yAxis->line->setY($y2, $y1);
     $this->yAxis->label->setAlign(LABEL_RIGHT);
     $this->yAxis->label->move(-6, 0);
     $this->yAxis->reverseTickStyle();
     $this->yAxis->setRange($this->extremum->bottom, $this->extremum->top);
     $this->xAxis->setYCenter($this->yAxis, 0);
     $this->yAxis->setXCenter($this->xAxis, 0);
     if ($this->yAxis->getLabelNumber() === NULL) {
         $number = $this->extremum->top - $this->extremum->bottom + 1;
         $this->yAxis->setLabelNumber($number);
     }
     if ($this->xAxis->getLabelNumber() === NULL) {
         $number = $this->extremum->right - $this->extremum->left + 1;
         $this->xAxis->setLabelNumber($number);
     }
     // Set ticks
     $this->xAxis->ticks['major']->setNumber($this->xAxis->getLabelNumber());
     $this->yAxis->ticks['major']->setNumber($this->yAxis->getLabelNumber());
     // Set axis labels
     $labels = array();
     for ($i = 0, $count = $this->xAxis->getLabelNumber(); $i < $count; $i++) {
         $labels[] = $i;
     }
     $this->xAxis->label->set($labels);
     $labels = array();
     for ($i = 0, $count = $this->yAxis->getLabelNumber(); $i < $count; $i++) {
         $labels[] = $i;
     }
     $this->yAxis->label->set($labels);
     parent::init($drawer);
     // Create the grid
     $this->createGrid();
     // Draw the grid
     $this->grid->draw($drawer, $x1, $y1, $x2, $y2);
 }
開發者ID:ber5ien,項目名稱:www.jade-palace.co.uk,代碼行數:42,代碼來源:MathPlot.class.php


注:本文中的Axis::reverseTickStyle方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。