180 public function __construct(
$name,
PHPExcel_Chart_Title $title = null,
PHPExcel_Chart_Legend $legend = null,
PHPExcel_Chart_PlotArea $plotArea = null, $plotVisibleOnly =
true, $displayBlanksAs =
'0',
PHPExcel_Chart_Title $xAxisLabel = null,
PHPExcel_Chart_Title $yAxisLabel = null,
PHPExcel_Chart_Axis $xAxis = null,
PHPExcel_Chart_Axis $yAxis = null,
PHPExcel_Chart_GridLines $majorGridlines = null,
PHPExcel_Chart_GridLines $minorGridlines = null)
182 $this->_name =
$name;
188 $this->_plotVisibleOnly = $plotVisibleOnly;
189 $this->_displayBlanksAs = $displayBlanksAs;
190 $this->_xAxis = $xAxis;
191 $this->_yAxis = $yAxis;
192 $this->_majorGridlines = $majorGridlines;
193 $this->_minorGridlines = $minorGridlines;
222 $this->_worksheet = $pValue;
285 $this->_xAxisLabel = $label;
306 $this->_yAxisLabel = $label;
336 $this->_plotVisibleOnly = $plotVisibleOnly;
357 $this->_displayBlanksAs = $displayBlanksAs;
367 if($this->_yAxis !== NULL){
380 if($this->_xAxis !== NULL){
393 if($this->_majorGridlines !== NULL){
406 if($this->_minorGridlines !== NULL){
423 $this->_topLeftCellRef = $cell;
424 if (!is_null($xOffset))
426 if (!is_null($yOffset))
438 return array(
'cell' => $this->_topLeftCellRef,
439 'xOffset' => $this->_topLeftXOffset,
440 'yOffset' => $this->_topLeftYOffset
460 $this->_topLeftCellRef = $cell;
473 if (!is_null($xOffset))
475 if (!is_null($yOffset))
487 return array(
'X' => $this->_topLeftXOffset,
488 'Y' => $this->_topLeftYOffset
493 $this->_topLeftXOffset = $xOffset;
503 $this->_topLeftYOffset = $yOffset;
521 $this->_bottomRightCellRef = $cell;
522 if (!is_null($xOffset))
524 if (!is_null($yOffset))
536 return array(
'cell' => $this->_bottomRightCellRef,
537 'xOffset' => $this->_bottomRightXOffset,
538 'yOffset' => $this->_bottomRightYOffset
543 $this->_bottomRightCellRef = $cell;
565 if (!is_null($xOffset))
567 if (!is_null($yOffset))
579 return array(
'X' => $this->_bottomRightXOffset,
580 'Y' => $this->_bottomRightYOffset
585 $this->_bottomRightXOffset = $xOffset;
595 $this->_bottomRightYOffset = $yOffset;
606 if ($this->_worksheet !== NULL) {
607 $this->_plotArea->refresh($this->_worksheet);
611 public function render($outputDestination = null) {
613 if (is_null($libraryName)) {
620 $includePath = str_replace(
'\\',
'/',get_include_path());
621 $rendererPath = str_replace(
'\\',
'/',$libraryPath);
622 if (strpos($rendererPath,$includePath) ===
false) {
623 set_include_path(get_include_path() . PATH_SEPARATOR . $libraryPath);
629 if ($outputDestination ==
'php://output') {
630 $outputDestination = null;
632 return $renderer->render($outputDestination);
setTopLeftOffset($xOffset=null, $yOffset=null)
Set the offset position within the Top Left cell for the chart.
setTopLeftCell($cell)
Set the Top Left cell position for the chart.
getChartAxisX()
Get xAxis.
getPlotArea()
Get Plot Area.
setXAxisLabel(PHPExcel_Chart_Title $label)
Set X-Axis Label.
getBottomRightCell()
Get the cell address where the bottom right of the chart is fixed.
getTopLeftCell()
Get the cell address where the top left of the chart is fixed.
getWorksheet()
Get Worksheet.
setTopLeftYOffset($yOffset)
getMajorGridlines()
Get Major Gridlines.
getMinorGridlines()
Get Minor Gridlines.
getBottomRightOffset()
Get the offset position within the Bottom Right cell for the chart.
getTopLeftOffset()
Get the offset position within the Top Left cell for the chart.
getBottomRightPosition()
Get the bottom right position of the chart.
getPlotVisibleOnly()
Get Plot Visible Only.
setTopLeftPosition($cell, $xOffset=null, $yOffset=null)
Set the Top Left position for the chart.
getChartAxisY()
Get yAxis.
static getChartRendererName()
Return the Chart Rendering Library that PHPExcel is currently configured to use (e.g.
$rendererName
Include PHPExcel.
setBottomRightCell($cell)
setTopLeftXOffset($xOffset)
setTitle(PHPExcel_Chart_Title $title)
Set Title.
setYAxisLabel(PHPExcel_Chart_Title $label)
Set Y-Axis Label.
getXAxisLabel()
Get X-Axis Label.
setDisplayBlanksAs($displayBlanksAs='0')
Set Display Blanks as.
setWorksheet(PHPExcel_Worksheet $pValue=null)
Set Worksheet.
__construct($name, PHPExcel_Chart_Title $title=null, PHPExcel_Chart_Legend $legend=null, PHPExcel_Chart_PlotArea $plotArea=null, $plotVisibleOnly=true, $displayBlanksAs='0', PHPExcel_Chart_Title $xAxisLabel=null, PHPExcel_Chart_Title $yAxisLabel=null, PHPExcel_Chart_Axis $xAxis=null, PHPExcel_Chart_Axis $yAxis=null, PHPExcel_Chart_GridLines $majorGridlines=null, PHPExcel_Chart_GridLines $minorGridlines=null)
Create a new PHPExcel_Chart.
setBottomRightOffset($xOffset=null, $yOffset=null)
Set the offset position within the Bottom Right cell for the chart.
getTopLeftPosition()
Get the top left position of the chart.
static getChartRendererPath()
Return the directory path to the Chart Rendering Library that PHPExcel is currently configured to use...
Create styles array
The data for the language used.
setLegend(PHPExcel_Chart_Legend $legend)
Set Legend.
getDisplayBlanksAs()
Get Display Blanks as.
setPlotVisibleOnly($plotVisibleOnly=true)
Set Plot Visible Only.
setBottomRightPosition($cell, $xOffset=null, $yOffset=null)
Set the Bottom Right position of the chart.
setBottomRightXOffset($xOffset)
setBottomRightYOffset($yOffset)
render($outputDestination=null)
getYAxisLabel()
Get Y-Axis Label.