150 public function __construct(
$name, ?
Title $title =
null, ?
Legend $legend =
null, ?
PlotArea $plotArea =
null,
$plotVisibleOnly =
true,
$displayBlanksAs =
DataSeries::EMPTY_AS_GAP, ?
Title $xAxisLabel =
null, ?
Title $yAxisLabel =
null, ?
Axis $xAxis =
null, ?
Axis $yAxis =
null, ?
GridLines $majorGridlines =
null, ?
GridLines $minorGridlines =
null)
195 $this->worksheet = $pValue;
261 $this->xAxisLabel = $label;
283 $this->yAxisLabel = $label;
353 if ($this->yAxis !==
null) {
367 if ($this->xAxis !==
null) {
381 if ($this->majorGridlines !==
null) {
395 if ($this->minorGridlines !==
null) {
413 $this->topLeftCellRef = $cell;
414 if ($xOffset !==
null) {
417 if ($yOffset !==
null) {
457 $this->topLeftCellRef = $cell;
472 if ($xOffset !==
null) {
476 if ($yOffset !==
null) {
498 $this->topLeftXOffset = $xOffset;
510 $this->topLeftYOffset = $yOffset;
531 $this->bottomRightCellRef = $cell;
532 if ($xOffset !==
null) {
535 if ($yOffset !==
null) {
558 $this->bottomRightCellRef = $cell;
583 if ($xOffset !==
null) {
587 if ($yOffset !==
null) {
609 $this->bottomRightXOffset = $xOffset;
621 $this->bottomRightYOffset = $yOffset;
633 if ($this->worksheet !==
null) {
634 $this->plotArea->refresh($this->worksheet);
645 public function render($outputDestination =
null)
647 if ($outputDestination ==
'php://output') {
648 $outputDestination =
null;
652 if ($libraryName ===
null) {
659 $renderer =
new $libraryName($this);
661 return $renderer->render($outputDestination);
An exception for terminatinating execution or to throw for unit testing.
setTopLeftOffset($xOffset, $yOffset)
Set the offset position within the Top Left cell for the chart.
setWorksheet(?Worksheet $pValue=null)
Set Worksheet.
getBottomRightPosition()
Get the bottom right position of the chart.
getTopLeftOffset()
Get the offset position within the Top Left cell for the chart.
setDisplayBlanksAs($displayBlanksAs)
Set Display Blanks as.
setTitle(Title $title)
Set Title.
getTopLeftCell()
Get the cell address where the top left of the chart is fixed.
getPlotArea()
Get Plot Area.
setTopLeftYOffset($yOffset)
getBottomRightCell()
Get the cell address where the bottom right of the chart is fixed.
getXAxisLabel()
Get X-Axis Label.
getMinorGridlines()
Get Minor Gridlines.
getMajorGridlines()
Get Major Gridlines.
setBottomRightYOffset($yOffset)
setTopLeftCell($cell)
Set the Top Left cell position for the chart.
getDisplayBlanksAs()
Get Display Blanks as.
getWorksheet()
Get Worksheet.
setBottomRightCell($cell)
setYAxisLabel(Title $label)
Set Y-Axis Label.
setBottomRightOffset($xOffset, $yOffset)
Set the offset position within the Bottom Right cell for the chart.
setPlotVisibleOnly($plotVisibleOnly)
Set Plot Visible Only.
setBottomRightPosition($cell, $xOffset=null, $yOffset=null)
Set the Bottom Right position of the chart.
getPlotVisibleOnly()
Get Plot Visible Only.
getChartAxisX()
Get xAxis.
getBottomRightOffset()
Get the offset position within the Bottom Right cell for the chart.
getTopLeftPosition()
Get the top left position of the chart.
getYAxisLabel()
Get Y-Axis Label.
render($outputDestination=null)
Render the chart to given file (or stream).
setXAxisLabel(Title $label)
Set X-Axis Label.
getChartAxisY()
Get yAxis.
setTopLeftXOffset($xOffset)
setBottomRightXOffset($xOffset)
__construct($name, ?Title $title=null, ?Legend $legend=null, ?PlotArea $plotArea=null, $plotVisibleOnly=true, $displayBlanksAs=DataSeries::EMPTY_AS_GAP, ?Title $xAxisLabel=null, ?Title $yAxisLabel=null, ?Axis $xAxis=null, ?Axis $yAxis=null, ?GridLines $majorGridlines=null, ?GridLines $minorGridlines=null)
Create a new Chart.
setLegend(Legend $legend)
Set Legend.
setTopLeftPosition($cell, $xOffset=null, $yOffset=null)
Set the Top Left position for the chart.
static getChartRenderer()
Return the Chart Rendering Library that PhpSpreadsheet is currently configured to use.