Chart
in package
Table of Contents
Properties
- $autoTitleDeleted : bool
- $borderLines : GridLines
- $bottomRightCellRef : string
- Bottom-Right Cell Position.
- $bottomRightXOffset : int
- Bottom-Right X-Offset.
- $bottomRightYOffset : int
- Bottom-Right Y-Offset.
- $displayBlanksAs : string
- Display Blanks as.
- $fillColor : ChartColor
- $legend : Legend|null
- Chart Legend.
- $name : string
- Chart Name.
- $noBorder : bool
- $noFill : bool
- $oneCellAnchor : bool
- $perspective : int|null
- $plotArea : PlotArea|null
- Chart Plot Area.
- $plotVisibleOnly : bool
- Plot Visible Only.
- $rAngAx : int|null
- $renderedHeight : float|null
- Rendered height in pixels.
- $renderedWidth : float|null
- Rendered width in pixels.
- $rotX : int|null
- $rotY : int|null
- $roundedCorners : bool
- $title : Title|null
- Chart Title.
- $topLeftCellRef : string
- Top-Left Cell Position.
- $topLeftXOffset : int
- Top-Left X-Offset.
- $topLeftYOffset : int
- Top-Left Y-Offset.
- $worksheet : Worksheet|null
- Worksheet.
- $xAxis : Axis
- Chart Asix X as.
- $xAxisLabel : Title|null
- X-Axis Label.
- $yAxis : Axis
- Chart Asix Y as.
- $yAxisLabel : Title|null
- Y-Axis Label.
Methods
- __clone() : mixed
- Implement PHP __clone to create a deep clone, not just a shallow copy.
- __construct() : mixed
- Create a new Chart.
- __destruct() : mixed
- getAutoTitleDeleted() : bool
- getBorderLines() : GridLines
- getBottomRightCell() : string
- Get the cell address where the bottom right of the chart is fixed.
- getBottomRightOffset() : array<string|int, int>
- Get the offset position within the Bottom Right cell for the chart.
- getBottomRightPosition() : array<string|int, mixed>
- Get the bottom right position of the chart.
- getBottomRightXOffset() : int
- getBottomRightYOffset() : int
- getChartAxisX() : Axis
- getChartAxisY() : Axis
- getDisplayBlanksAs() : string
- Get Display Blanks as.
- getFillColor() : ChartColor
- getLegend() : Legend|null
- getName() : string
- Get Name.
- getNoBorder() : bool
- getNoFill() : bool
- getOneCellAnchor() : bool
- getPerspective() : int|null
- getPlotArea() : PlotArea|null
- getPlotAreaOrThrow() : PlotArea
- getPlotVisibleOnly() : bool
- Get Plot Visible Only.
- getRAngAx() : int|null
- getRenderedHeight() : float|null
- getRenderedWidth() : float|null
- getRotX() : int|null
- getRotY() : int|null
- getRoundedCorners() : bool
- getTitle() : Title|null
- getTopLeftCell() : string
- Get the cell address where the top left of the chart is fixed.
- getTopLeftOffset() : array<string|int, int>
- Get the offset position within the Top Left cell for the chart.
- getTopLeftPosition() : array{cell: string, xOffset: int, yOffset: int}
- Get the top left position of the chart.
- getTopLeftXOffset() : int
- getTopLeftYOffset() : int
- getWorksheet() : Worksheet|null
- Get Worksheet.
- getXAxisLabel() : Title|null
- getYAxisLabel() : Title|null
- refresh() : void
- render() : bool
- Render the chart to given file (or stream).
- setAutoTitleDeleted() : self
- setBorderLines() : self
- setBottomRightCell() : $this
- Set the Bottom Right cell for the chart.
- setBottomRightOffset() : $this
- Set the offset position within the Bottom Right cell for the chart.
- setBottomRightPosition() : $this
- Set the Bottom Right position of the chart.
- setBottomRightXOffset() : $this
- setBottomRightYOffset() : $this
- setChartAxisX() : self
- Set xAxis.
- setChartAxisY() : self
- Set yAxis.
- setDisplayBlanksAs() : $this
- Set Display Blanks as.
- setLegend() : $this
- Set Legend.
- setName() : self
- setNoBorder() : self
- setNoFill() : self
- setOneCellAnchor() : self
- setPerspective() : self
- setPlotArea() : self
- Set Plot Area.
- setPlotVisibleOnly() : $this
- Set Plot Visible Only.
- setRAngAx() : self
- setRenderedHeight() : self
- setRenderedWidth() : self
- setRotX() : self
- setRotY() : self
- setRoundedCorners() : self
- setTitle() : $this
- Set Title.
- setTopLeftCell() : $this
- Set the Top Left cell position for the chart.
- setTopLeftOffset() : $this
- Set the offset position within the Top Left cell for the chart.
- setTopLeftPosition() : $this
- Set the Top Left position for the chart.
- setTopLeftXOffset() : $this
- setTopLeftYOffset() : $this
- setWorksheet() : $this
- Set Worksheet.
- setXAxisLabel() : $this
- Set X-Axis Label.
- setYAxisLabel() : $this
- Set Y-Axis Label.
Properties
$autoTitleDeleted
private
bool
$autoTitleDeleted
= false
$borderLines
private
GridLines
$borderLines
$bottomRightCellRef
Bottom-Right Cell Position.
private
string
$bottomRightCellRef
= ''
$bottomRightXOffset
Bottom-Right X-Offset.
private
int
$bottomRightXOffset
= 10
$bottomRightYOffset
Bottom-Right Y-Offset.
private
int
$bottomRightYOffset
= 10
$displayBlanksAs
Display Blanks as.
private
string
$displayBlanksAs
$fillColor
private
ChartColor
$fillColor
$legend
Chart Legend.
private
Legend|null
$legend
$name
Chart Name.
private
string
$name
$noBorder
private
bool
$noBorder
= false
$noFill
private
bool
$noFill
= false
$oneCellAnchor
private
bool
$oneCellAnchor
= false
$perspective
private
int|null
$perspective
= null
$plotArea
Chart Plot Area.
private
PlotArea|null
$plotArea
$plotVisibleOnly
Plot Visible Only.
private
bool
$plotVisibleOnly
$rAngAx
private
int|null
$rAngAx
= null
$renderedHeight
Rendered height in pixels.
private
float|null
$renderedHeight
= null
$renderedWidth
Rendered width in pixels.
private
float|null
$renderedWidth
= null
$rotX
private
int|null
$rotX
= null
$rotY
private
int|null
$rotY
= null
$roundedCorners
private
bool
$roundedCorners
= false
$title
Chart Title.
private
Title|null
$title
$topLeftCellRef
Top-Left Cell Position.
private
string
$topLeftCellRef
= 'A1'
$topLeftXOffset
Top-Left X-Offset.
private
int
$topLeftXOffset
= 0
$topLeftYOffset
Top-Left Y-Offset.
private
int
$topLeftYOffset
= 0
$worksheet
Worksheet.
private
Worksheet|null
$worksheet
= null
$xAxis
Chart Asix X as.
private
Axis
$xAxis
$xAxisLabel
X-Axis Label.
private
Title|null
$xAxisLabel
$yAxis
Chart Asix Y as.
private
Axis
$yAxis
$yAxisLabel
Y-Axis Label.
private
Title|null
$yAxisLabel
Methods
__clone()
Implement PHP __clone to create a deep clone, not just a shallow copy.
public
__clone() : mixed
__construct()
Create a new Chart.
public
__construct(string $name[, Title|null $title = null ][, Legend|null $legend = null ][, PlotArea|null $plotArea = null ][, bool $plotVisibleOnly = true ][, string $displayBlanksAs = DataSeries::EMPTY_AS_GAP ][, Title|null $xAxisLabel = null ][, Title|null $yAxisLabel = null ][, Axis|null $xAxis = null ][, Axis|null $yAxis = null ][, GridLines|null $majorGridlines = null ][, GridLines|null $minorGridlines = null ]) : mixed
majorGridlines and minorGridlines are deprecated, moved to Axis.
Parameters
- $name : string
- $title : Title|null = null
- $legend : Legend|null = null
- $plotArea : PlotArea|null = null
- $plotVisibleOnly : bool = true
- $displayBlanksAs : string = DataSeries::EMPTY_AS_GAP
- $xAxisLabel : Title|null = null
- $yAxisLabel : Title|null = null
- $xAxis : Axis|null = null
- $yAxis : Axis|null = null
- $majorGridlines : GridLines|null = null
- $minorGridlines : GridLines|null = null
__destruct()
public
__destruct() : mixed
getAutoTitleDeleted()
public
getAutoTitleDeleted() : bool
Return values
boolgetBorderLines()
public
getBorderLines() : GridLines
Return values
GridLinesgetBottomRightCell()
Get the cell address where the bottom right of the chart is fixed.
public
getBottomRightCell() : string
Return values
stringgetBottomRightOffset()
Get the offset position within the Bottom Right cell for the chart.
public
getBottomRightOffset() : array<string|int, int>
Return values
array<string|int, int>getBottomRightPosition()
Get the bottom right position of the chart.
public
getBottomRightPosition() : array<string|int, mixed>
Return values
array<string|int, mixed> —an associative array containing the cell address, X-Offset and Y-Offset from the top left of that cell
getBottomRightXOffset()
public
getBottomRightXOffset() : int
Return values
intgetBottomRightYOffset()
public
getBottomRightYOffset() : int
Return values
intgetChartAxisX()
public
getChartAxisX() : Axis
Return values
AxisgetChartAxisY()
public
getChartAxisY() : Axis
Return values
AxisgetDisplayBlanksAs()
Get Display Blanks as.
public
getDisplayBlanksAs() : string
Return values
stringgetFillColor()
public
getFillColor() : ChartColor
Return values
ChartColorgetLegend()
public
getLegend() : Legend|null
Return values
Legend|nullgetName()
Get Name.
public
getName() : string
Return values
stringgetNoBorder()
public
getNoBorder() : bool
Return values
boolgetNoFill()
public
getNoFill() : bool
Return values
boolgetOneCellAnchor()
public
getOneCellAnchor() : bool
Return values
boolgetPerspective()
public
getPerspective() : int|null
Return values
int|nullgetPlotArea()
public
getPlotArea() : PlotArea|null
Return values
PlotArea|nullgetPlotAreaOrThrow()
public
getPlotAreaOrThrow() : PlotArea
Return values
PlotAreagetPlotVisibleOnly()
Get Plot Visible Only.
public
getPlotVisibleOnly() : bool
Return values
boolgetRAngAx()
public
getRAngAx() : int|null
Return values
int|nullgetRenderedHeight()
public
getRenderedHeight() : float|null
Return values
float|nullgetRenderedWidth()
public
getRenderedWidth() : float|null
Return values
float|nullgetRotX()
public
getRotX() : int|null
Return values
int|nullgetRotY()
public
getRotY() : int|null
Return values
int|nullgetRoundedCorners()
public
getRoundedCorners() : bool
Return values
boolgetTitle()
public
getTitle() : Title|null
Return values
Title|nullgetTopLeftCell()
Get the cell address where the top left of the chart is fixed.
public
getTopLeftCell() : string
Return values
stringgetTopLeftOffset()
Get the offset position within the Top Left cell for the chart.
public
getTopLeftOffset() : array<string|int, int>
Return values
array<string|int, int>getTopLeftPosition()
Get the top left position of the chart.
public
getTopLeftPosition() : array{cell: string, xOffset: int, yOffset: int}
Returns ['cell' => string cell address, 'xOffset' => int, 'yOffset' => int].
Return values
array{cell: string, xOffset: int, yOffset: int} —an associative array containing the cell address, X-Offset and Y-Offset from the top left of that cell
getTopLeftXOffset()
public
getTopLeftXOffset() : int
Return values
intgetTopLeftYOffset()
public
getTopLeftYOffset() : int
Return values
intgetWorksheet()
Get Worksheet.
public
getWorksheet() : Worksheet|null
Return values
Worksheet|nullgetXAxisLabel()
public
getXAxisLabel() : Title|null
Return values
Title|nullgetYAxisLabel()
public
getYAxisLabel() : Title|null
Return values
Title|nullrefresh()
public
refresh() : void
render()
Render the chart to given file (or stream).
public
render([string|null $outputDestination = null ]) : bool
Parameters
- $outputDestination : string|null = null
-
Name of the file render to
Return values
bool —true on success
setAutoTitleDeleted()
public
setAutoTitleDeleted(bool $autoTitleDeleted) : self
Parameters
- $autoTitleDeleted : bool
Return values
selfsetBorderLines()
public
setBorderLines(GridLines $borderLines) : self
Parameters
- $borderLines : GridLines
Return values
selfsetBottomRightCell()
Set the Bottom Right cell for the chart.
public
setBottomRightCell([string $cellAddress = '' ]) : $this
Parameters
- $cellAddress : string = ''
Return values
$thissetBottomRightOffset()
Set the offset position within the Bottom Right cell for the chart.
public
setBottomRightOffset(int|null $xOffset, int|null $yOffset) : $this
Parameters
- $xOffset : int|null
- $yOffset : int|null
Return values
$thissetBottomRightPosition()
Set the Bottom Right position of the chart.
public
setBottomRightPosition([string $cellAddress = '' ][, int|null $xOffset = null ][, int|null $yOffset = null ]) : $this
Parameters
- $cellAddress : string = ''
- $xOffset : int|null = null
- $yOffset : int|null = null
Return values
$thissetBottomRightXOffset()
public
setBottomRightXOffset(int $xOffset) : $this
Parameters
- $xOffset : int
Return values
$thissetBottomRightYOffset()
public
setBottomRightYOffset(int $yOffset) : $this
Parameters
- $yOffset : int
Return values
$thissetChartAxisX()
Set xAxis.
public
setChartAxisX(Axis|null $axis) : self
Parameters
- $axis : Axis|null
Return values
selfsetChartAxisY()
Set yAxis.
public
setChartAxisY(Axis|null $axis) : self
Parameters
- $axis : Axis|null
Return values
selfsetDisplayBlanksAs()
Set Display Blanks as.
public
setDisplayBlanksAs(string $displayBlanksAs) : $this
Parameters
- $displayBlanksAs : string
Return values
$thissetLegend()
Set Legend.
public
setLegend(Legend $legend) : $this
Parameters
- $legend : Legend
Return values
$thissetName()
public
setName(string $name) : self
Parameters
- $name : string
Return values
selfsetNoBorder()
public
setNoBorder(bool $noBorder) : self
Parameters
- $noBorder : bool
Return values
selfsetNoFill()
public
setNoFill(bool $noFill) : self
Parameters
- $noFill : bool
Return values
selfsetOneCellAnchor()
public
setOneCellAnchor(bool $oneCellAnchor) : self
Parameters
- $oneCellAnchor : bool
Return values
selfsetPerspective()
public
setPerspective(int|null $perspective) : self
Parameters
- $perspective : int|null
Return values
selfsetPlotArea()
Set Plot Area.
public
setPlotArea(PlotArea $plotArea) : self
Parameters
- $plotArea : PlotArea
Return values
selfsetPlotVisibleOnly()
Set Plot Visible Only.
public
setPlotVisibleOnly(bool $plotVisibleOnly) : $this
Parameters
- $plotVisibleOnly : bool
Return values
$thissetRAngAx()
public
setRAngAx(int|null $rAngAx) : self
Parameters
- $rAngAx : int|null
Return values
selfsetRenderedHeight()
public
setRenderedHeight(float|null $height) : self
Parameters
- $height : float|null
Return values
selfsetRenderedWidth()
public
setRenderedWidth(float|null $width) : self
Parameters
- $width : float|null
Return values
selfsetRotX()
public
setRotX(int|null $rotX) : self
Parameters
- $rotX : int|null
Return values
selfsetRotY()
public
setRotY(int|null $rotY) : self
Parameters
- $rotY : int|null
Return values
selfsetRoundedCorners()
public
setRoundedCorners(bool|null $roundedCorners) : self
Parameters
- $roundedCorners : bool|null
Return values
selfsetTitle()
Set Title.
public
setTitle(Title $title) : $this
Parameters
- $title : Title
Return values
$thissetTopLeftCell()
Set the Top Left cell position for the chart.
public
setTopLeftCell(string $cellAddress) : $this
Parameters
- $cellAddress : string
Return values
$thissetTopLeftOffset()
Set the offset position within the Top Left cell for the chart.
public
setTopLeftOffset(int|null $xOffset, int|null $yOffset) : $this
Parameters
- $xOffset : int|null
- $yOffset : int|null
Return values
$thissetTopLeftPosition()
Set the Top Left position for the chart.
public
setTopLeftPosition(string $cellAddress[, int|null $xOffset = null ][, int|null $yOffset = null ]) : $this
Parameters
- $cellAddress : string
- $xOffset : int|null = null
- $yOffset : int|null = null
Return values
$thissetTopLeftXOffset()
public
setTopLeftXOffset(int $xOffset) : $this
Parameters
- $xOffset : int
Return values
$thissetTopLeftYOffset()
public
setTopLeftYOffset(int $yOffset) : $this
Parameters
- $yOffset : int
Return values
$thissetWorksheet()
Set Worksheet.
public
setWorksheet([Worksheet|null $worksheet = null ]) : $this
Parameters
- $worksheet : Worksheet|null = null
Return values
$thissetXAxisLabel()
Set X-Axis Label.
public
setXAxisLabel(Title $label) : $this
Parameters
- $label : Title
Return values
$thissetYAxisLabel()
Set Y-Axis Label.
public
setYAxisLabel(Title $label) : $this
Parameters
- $label : Title