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);
setTopLeftOffset($xOffset, $yOffset)
Set the offset position within the Top Left cell for the chart.
getTopLeftCell()
Get the cell address where the top left of the chart is fixed.
getPlotArea()
Get Plot Area.
setXAxisLabel(Title $label)
Set X-Axis Label.
setTitle(Title $title)
Set Title.
getXAxisLabel()
Get X-Axis Label.
__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.
getChartAxisY()
Get yAxis.
setTopLeftXOffset($xOffset)
getBottomRightCell()
Get the cell address where the bottom right of the chart is fixed.
getChartAxisX()
Get xAxis.
setBottomRightCell($cell)
getBottomRightOffset()
Get the offset position within the Bottom Right cell for the chart.
getMajorGridlines()
Get Major Gridlines.
render($outputDestination=null)
Render the chart to given file (or stream).
getDisplayBlanksAs()
Get Display Blanks as.
getMinorGridlines()
Get Minor Gridlines.
setDisplayBlanksAs($displayBlanksAs)
Set Display Blanks as.
setTopLeftCell($cell)
Set the Top Left cell position for the chart.
setTopLeftYOffset($yOffset)
setBottomRightYOffset($yOffset)
setPlotVisibleOnly($plotVisibleOnly)
Set Plot Visible Only.
setBottomRightPosition($cell, $xOffset=null, $yOffset=null)
Set the Bottom Right position of the chart.
setBottomRightOffset($xOffset, $yOffset)
Set the offset position within the Bottom Right cell for the chart.
static getChartRenderer()
Return the Chart Rendering Library that PhpSpreadsheet is currently configured to use...
setWorksheet(?Worksheet $pValue=null)
Set Worksheet.
getPlotVisibleOnly()
Get Plot Visible Only.
getTopLeftPosition()
Get the top left position of the chart.
setYAxisLabel(Title $label)
Set Y-Axis Label.
getYAxisLabel()
Get Y-Axis Label.
getTopLeftOffset()
Get the offset position within the Top Left cell for the chart.
getWorksheet()
Get Worksheet.
getBottomRightPosition()
Get the bottom right position of the chart.
setLegend(Legend $legend)
Set Legend.
setTopLeftPosition($cell, $xOffset=null, $yOffset=null)
Set the Top Left position for the chart.
setBottomRightXOffset($xOffset)