/** * Sets the parent. The parent chain should ultimately be a GraPHP object * * @see Image_Graph_Common * @param Image_Graph_Common $parent The parent * @access private */ function _setParent(&$parent) { parent::_setParent($parent); if ($this->_axisX !== null) { $this->_axisX->_setParent($this); } if ($this->_axisY !== null) { $this->_axisY->_setParent($this); } if ($this->_axisYSecondary !== null) { $this->_axisYSecondary->_setParent($this); } }
/** * Image_Graph_Plotarea [Constructor] * @param Image_Graph_Axis $axisX The X axis (if false or omitted a std. axis is created) * @param Image_Graph_Axis $axisY The Y axis (if false or omitted a std. axis is created) */ function &Image_Graph_Plotarea($axisX = false, $axisY = false) { parent::__construct(); $this->_padding = 10; if (($axisX == null) and ($axisX !== false)) { $this->_axisX = null; } elseif ($axisX !== false) { $this->_axisX = & $axisX; } else { $this->_axisX = & new Image_Graph_Axis(IMAGE_GRAPH_AXIS_X); } if (is_object($this->_axisX)) { $this->_axisX->_setParent($this); } if (($axisY == null) and ($axisY !== false)) { $this->_axisY = null; } elseif ($axisY !== false) { $this->_axisY = & $axisY; } else { $this->_axisY = & new Image_Graph_Axis(IMAGE_GRAPH_AXIS_Y); } if (is_object($this->_axisY)) { $this->_axisY->_setParent($this); $this->_axisY->_setMinimum(0); } }