2   require_once(LIBRARY_DIR.'/libchart/classes/libchart.php');
 
   5         * Pie chart extension to render pies with no title and labels
 
  10         class PieChartEx extends PieChart
 
  13                 * Render the chart image
 
  16                 * @param        array           options: fileName, hideLogo, hideTitle, hidePie, hideLabel
 
  19                 public function renderEx($options)
 
  21                         $hideLabel = isset($options['hideLabel']) && $options['hideLabel'] == true;
 
  23                         $this->computePercent();
 
  26                          $this->plot->setGraphPadding(new Padding(0));
 
  27                          $this->plot->setTitleHeight(0);
 
  29                         $this->computeLayout(!$hideLabel);
 
  33                         if (!isset($options['hideLogo']) || $options['hideLogo'] == false)
 
  34                                 $this->plot->printLogo();
 
  35                         if (!isset($options['hideTitle']) || $options['hideTitle'] == false)
 
  36                                 $this->plot->printTitle();
 
  37                         if (!isset($options['hidePie']) || $options['hidePie'] == false)
 
  42                         /*if(isset($options['fileName']))
 
  43                                 imagepng($this->img, $options['fileName']);
 
  45                                 imagepng($this->img); */
 
  46                         $this->plot->render($options['fileName']);