/** * Renders the caption. */ protected function printCaption() { // Get the list of labels $labelList = $this->dataSet->getTitleList(); // Create the caption $caption = new Caption(); $caption->setPlot($this->plot); $caption->setLabelList($labelList); $palette = $this->plot->getPalette(); $barColorSet = $palette->barColorSet; $caption->setColorSet($barColorSet); // Render the caption $caption->render(); }
/** * Renders the caption. */ protected function printCaption() { // Create a list of labels $labelList = array(); foreach ($this->percent as $percent) { list($percent, $point) = $percent; $label = $point->getX(); array_push($labelList, $label); } // Create the caption $caption = new Caption(); $caption->setPlot($this->plot); $caption->setLabelList($labelList); $palette = $this->plot->getPalette(); $pieColorSet = $palette->pieColorSet; $caption->setColorSet($pieColorSet); // Render the caption $caption->render(); }