/** * Description... * * @return void **/ public function __setGraph(RM_Plot_Graph $graph) { $this->_graph = $graph; if (isset($this->_props['xLabels'])) { $this->_graph->addLabels($this->_props['xLabels']); } }
public function draw() { $this->_graph = M('Plot')->initGraph('graph', $this->width, $this->height, $this->id()); $this->strategy()->draw($this->_data()); if ($this->caption()) { $this->getGraph()->setTitle($this->caption()); } if ($this->yLabelsCallbackFunction()) { $this->_graph->yaxis->SetLabelFormatCallback($this->yLabelsCallbackFunction()); } if ($this->_mediator()->_yCaption) { $this->_graph->setCaptionAxisY($this->_mediator()->_yCaption); } $filename = M('Tools')->file()->prepareFilePath('/tmp/' . md5(uniqid(rand()))); $this->_graph->Stroke($filename); $image = $this->addImage($filename); $this->calculated = 1; return $image; }
public function _createGraph(RM_Total_Object $object, RM_Plot_Graph $graph) { $filename = M('Tools')->file()->prepareFilePath('/tmp/' . md5(uniqid(rand()))); $graph->Stroke($filename); return $this->addImage($object, $filename); }