Ejemplo n.º 1
0
 public function render($outputDestination = null)
 {
     $libraryName = PHPExcel_Settings::getChartRendererName();
     if (is_null($libraryName)) {
         return false;
     }
     //	Ensure that data series values are up-to-date before we render
     $this->refresh();
     $libraryPath = PHPExcel_Settings::getChartRendererPath();
     $includePath = str_replace('\\', '/', get_include_path());
     $rendererPath = str_replace('\\', '/', $libraryPath);
     if (strpos($rendererPath, $includePath) === false) {
         set_include_path(get_include_path() . PATH_SEPARATOR . $libraryPath);
     }
     $rendererName = 'PHPExcel_Chart_Renderer_' . $libraryName;
     $renderer = new $rendererName($this);
     if ($outputDestination == 'php://output') {
         $outputDestination = null;
     }
     return $renderer->render($outputDestination);
 }