Esempio n. 1
0
 /**
  * Renders the caption.
  */
 protected function printCaption() {
     // Get the list of labels
     $labelList = $this->dataSet->getTitleList();
     
     // Create the caption
     $caption = new Caption($this->plot);
     $caption->setLabelList($labelList);
     
     $palette = $this->plot->getPalette();
     $lineColorSet = $palette->lineColorSet;
     $caption->setColorSet($lineColorSet);
     
     // Render the caption
     $caption->render();
 }
Esempio n. 2
0
        /**
         * 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($this->plot);
            $caption->setLabelList($labelList);
            
            $palette = $this->plot->getPalette();
            $pieColorSet = $palette->pieColorSet;
            $caption->setColorSet($pieColorSet);

            // Render the caption
            $caption->render();
        }