示例#1
0
 /**
  * Set the extrema of the axis
  *
  * @param Image_Graph_Plot $plot The plot that 'hold' the values
  * @access private
  */
 function _setExtrema(&$plot)
 {
     if ($this->_axisX != null && $this->_axisX->_isNumeric()) {
         $this->_axisX->_setMinimum($plot->_minimumX());
         $this->_axisX->_setMaximum($plot->_maximumX());
     }
     if ($plot->_axisY == IMAGE_GRAPH_AXIS_Y_SECONDARY && $this->_axisYSecondary !== null && $this->_axisYSecondary->_isNumeric()) {
         $this->_axisYSecondary->_setMinimum($plot->_minimumY());
         $this->_axisYSecondary->_setMaximum($plot->_maximumY());
     } elseif ($this->_axisY != null && $this->_axisY->_isNumeric()) {
         $this->_axisY->_setMinimum($plot->_minimumY());
         $this->_axisY->_setMaximum($plot->_maximumY());
     }
     $datasets =& $plot->dataset();
     if (!is_array($datasets)) {
         $datasets = array($datasets);
     }
     $keys = array_keys($datasets);
     foreach ($keys as $key) {
         $dataset =& $datasets[$key];
         if ($dataset->count() > 0) {
             $this->_hasData = true;
         }
         if (is_a($dataset, 'Image_Graph_Dataset')) {
             if ($this->_axisX != null && !$this->_axisX->_isNumeric()) {
                 $this->_axisX->_applyDataset($dataset);
             }
             if ($plot->_axisY == IMAGE_GRAPH_AXIS_Y_SECONDARY && $this->_axisYSecondary !== null && !$this->_axisYSecondary->_isNumeric()) {
                 $this->_axisYSecondary->_applyDataset($dataset);
             } elseif ($this->_axisY != null && !$this->_axisY->_isNumeric()) {
                 $this->_axisY->_applyDataset($dataset);
             }
         }
     }
     unset($keys);
 }
示例#2
0
 /**
  * Return the maximum Y point
  *
  * @return double The maximum Y point
  * @access private
  */
 function _maximumY()
 {
     return 1.05 * parent::_maximumY();
 }