Beispiel #1
0
        /**
         * Create the image.
         */
        protected function createImage() {
            parent::createImage();

            // Get graphical obects
            $img       = $this->plot->getImg();
            $palette   = $this->plot->getPalette();
            $text      = $this->plot->getText();
            $primitive = $this->plot->getPrimitive();
            
            // Get the graph area
            $graphArea = $this->plot->getGraphArea();

            // Axis (X/Y)
            imagerectangle($img, $graphArea->x1 - 1, $graphArea->y1, $graphArea->x1, $graphArea->y2, $palette->axisColor[0]->getColor($img));
            imagerectangle($img, $graphArea->x1 - 1, $graphArea->y2, $graphArea->x2, $graphArea->y2 + 1, $palette->axisColor[0]->getColor($img));
        }
Beispiel #2
0
 /**
  * Constructor of a pie chart.
  *
  * @param integer width of the image
  * @param integer height of the image
  */
 public function __construct($width = 600, $height = 250) {
     parent::__construct($width, $height);
     $this->plot->setGraphPadding(new Padding(15, 10, 30, 30));
 }