/** * Image_Graph_Axis [Constructor]. * Normally a manual creation should not be necessary, axis are created * automatically by the {@link Image_Graph_Plotarea} constructor unless * explicitly defined otherwise * * @param int $type The type (direction) of the Axis, use IMAGE_GRAPH_AXIS_X * for an X-axis (default, may be omitted) and IMAGE_GRAPH_AXIS_Y for Y- * axis) */ function Image_Graph_Axis($type = IMAGE_GRAPH_AXIS_X) { parent::__construct(); $this->_type = $type; $this->_fillStyle = 'black'; }
/** * PlotType [Constructor] * * Valid values for multiType are: * * 'normal' Plot is normal, multiple datasets are displayes next to one * another * * 'stacked' Datasets are stacked on top of each other * * 'stacked100pct' Datasets are stacked and displayed as percentages of the * total sum * * I no title is specified a default is used, which is basically the plot * type (fx. for a 'Image_Graph_Plot_Smoothed_Area' default title is * 'Smoothed Area') * * @param Image_Graph_Dataset &$dataset The data set (value containter) to * plot or an array of datasets * @param string $multiType The type of the plot * @param string $title The title of the plot (used for legends, * {@link Image_Graph_Legend}) */ function Image_Graph_Plot(&$dataset, $multiType = 'normal', $title = '') { if (!is_a($dataset, 'Image_Graph_Dataset')) { if (is_array($dataset)) { $keys = array_keys($dataset); foreach ($keys as $key) { if (!is_a($dataset[$key], 'Image_Graph_Dataset')) { $this->_error('Invalid dataset passed to ' . get_class($this)); } } unset($keys); } else { $this->_error('Invalid dataset passed to ' . get_class($this)); } } parent::__construct(); if ($dataset) { if (is_array($dataset)) { $this->_dataset =& $dataset; } else { $this->_dataset = array(&$dataset); } } if ($title) { $this->_title = $title; } else { $this->_title = str_replace('_', ' ', substr(get_class($this), 17)); } $multiType = strtolower($multiType); if ($multiType == 'normal' || $multiType == 'stacked' || $multiType == 'stacked100pct') { $this->_multiType = $multiType; } else { $this->_error('Invalid multitype: ' . $multiType . ' expected (normal|stacked|stacked100pct)'); $this->_multiType = 'normal'; } }
/** * Constructor */ function Image_Graph_Marker() { parent::__construct(); }
/** * Constructor */ function Image_Graph_Grid() { parent::__construct(); }
/** * Image_Graph_Layout [Constructor] */ function Image_Graph_Layout() { parent::__construct(); $this->_padding = array('left' => 2, 'top' => 2, 'right' => 2, 'bottom' => 2); }