Properties

$name

$name : string

Chart Name.

Type

string

$worksheet

$worksheet : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

Worksheet.

Type

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

$plotVisibleOnly

$plotVisibleOnly : boolean

Plot Visible Only.

Type

boolean

$displayBlanksAs

$displayBlanksAs : string

Display Blanks as.

Type

string

$topLeftCellRef

$topLeftCellRef : string

Top-Left Cell Position.

Type

string

$topLeftXOffset

$topLeftXOffset : integer

Top-Left X-Offset.

Type

integer

$topLeftYOffset

$topLeftYOffset : integer

Top-Left Y-Offset.

Type

integer

$bottomRightCellRef

$bottomRightCellRef : string

Bottom-Right Cell Position.

Type

string

$bottomRightXOffset

$bottomRightXOffset : integer

Bottom-Right X-Offset.

Type

integer

$bottomRightYOffset

$bottomRightYOffset : integer

Bottom-Right Y-Offset.

Type

integer

Methods

__construct()

__construct(mixed  $name, null|\PhpOffice\PhpSpreadsheet\Chart\Title  $title = null, null|\PhpOffice\PhpSpreadsheet\Chart\Legend  $legend = null, null|\PhpOffice\PhpSpreadsheet\Chart\PlotArea  $plotArea = null, mixed  $plotVisibleOnly = true, mixed  $displayBlanksAs = 'gap', null|\PhpOffice\PhpSpreadsheet\Chart\Title  $xAxisLabel = null, null|\PhpOffice\PhpSpreadsheet\Chart\Title  $yAxisLabel = null, null|\PhpOffice\PhpSpreadsheet\Chart\Axis  $xAxis = null, null|\PhpOffice\PhpSpreadsheet\Chart\Axis  $yAxis = null, null|\PhpOffice\PhpSpreadsheet\Chart\GridLines  $majorGridlines = null, null|\PhpOffice\PhpSpreadsheet\Chart\GridLines  $minorGridlines = null) 

Create a new Chart.

Parameters

mixed $name
null|\PhpOffice\PhpSpreadsheet\Chart\Title $title
null|\PhpOffice\PhpSpreadsheet\Chart\Legend $legend
null|\PhpOffice\PhpSpreadsheet\Chart\PlotArea $plotArea
mixed $plotVisibleOnly
mixed $displayBlanksAs
null|\PhpOffice\PhpSpreadsheet\Chart\Title $xAxisLabel
null|\PhpOffice\PhpSpreadsheet\Chart\Title $yAxisLabel
null|\PhpOffice\PhpSpreadsheet\Chart\Axis $xAxis
null|\PhpOffice\PhpSpreadsheet\Chart\Axis $yAxis
null|\PhpOffice\PhpSpreadsheet\Chart\GridLines $majorGridlines
null|\PhpOffice\PhpSpreadsheet\Chart\GridLines $minorGridlines

getName()

getName() : string

Get Name.

Returns

string

getWorksheet()

getWorksheet() : \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

Get Worksheet.

Returns

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet

setWorksheet()

setWorksheet(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet  $pValue = null) : $this

Set Worksheet.

Parameters

\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pValue

Returns

$this

getPlotVisibleOnly()

getPlotVisibleOnly() : boolean

Get Plot Visible Only.

Returns

boolean

setPlotVisibleOnly()

setPlotVisibleOnly(boolean  $plotVisibleOnly) : $this

Set Plot Visible Only.

Parameters

boolean $plotVisibleOnly

Returns

$this

getDisplayBlanksAs()

getDisplayBlanksAs() : string

Get Display Blanks as.

Returns

string

setDisplayBlanksAs()

setDisplayBlanksAs(string  $displayBlanksAs) : $this

Set Display Blanks as.

Parameters

string $displayBlanksAs

Returns

$this

setTopLeftPosition()

setTopLeftPosition(string  $cell, integer  $xOffset = null, integer  $yOffset = null) : $this

Set the Top Left position for the chart.

Parameters

string $cell
integer $xOffset
integer $yOffset

Returns

$this

getTopLeftPosition()

getTopLeftPosition() : array

Get the top left position of the chart.

Returns

array —

an associative array containing the cell address, X-Offset and Y-Offset from the top left of that cell

getTopLeftCell()

getTopLeftCell() : string

Get the cell address where the top left of the chart is fixed.

Returns

string

setTopLeftCell()

setTopLeftCell(string  $cell) : $this

Set the Top Left cell position for the chart.

Parameters

string $cell

Returns

$this

setTopLeftOffset()

setTopLeftOffset(integer  $xOffset, integer  $yOffset) : $this

Set the offset position within the Top Left cell for the chart.

Parameters

integer $xOffset
integer $yOffset

Returns

$this

getTopLeftOffset()

getTopLeftOffset() : array<mixed,integer>

Get the offset position within the Top Left cell for the chart.

Returns

array<mixed,integer>

setTopLeftXOffset()

setTopLeftXOffset(  $xOffset) 

Parameters

$xOffset

getTopLeftXOffset()

getTopLeftXOffset() 

setTopLeftYOffset()

setTopLeftYOffset(  $yOffset) 

Parameters

$yOffset

getTopLeftYOffset()

getTopLeftYOffset() 

setBottomRightPosition()

setBottomRightPosition(string  $cell, integer  $xOffset = null, integer  $yOffset = null) : $this

Set the Bottom Right position of the chart.

Parameters

string $cell
integer $xOffset
integer $yOffset

Returns

$this

getBottomRightPosition()

getBottomRightPosition() : array

Get the bottom right position of the chart.

Returns

array —

an associative array containing the cell address, X-Offset and Y-Offset from the top left of that cell

setBottomRightCell()

setBottomRightCell(  $cell) 

Parameters

$cell

getBottomRightCell()

getBottomRightCell() : string

Get the cell address where the bottom right of the chart is fixed.

Returns

string

setBottomRightOffset()

setBottomRightOffset(integer  $xOffset, integer  $yOffset) : $this

Set the offset position within the Bottom Right cell for the chart.

Parameters

integer $xOffset
integer $yOffset

Returns

$this

getBottomRightOffset()

getBottomRightOffset() : array<mixed,integer>

Get the offset position within the Bottom Right cell for the chart.

Returns

array<mixed,integer>

setBottomRightXOffset()

setBottomRightXOffset(  $xOffset) 

Parameters

$xOffset

getBottomRightXOffset()

getBottomRightXOffset() 

setBottomRightYOffset()

setBottomRightYOffset(  $yOffset) 

Parameters

$yOffset

getBottomRightYOffset()

getBottomRightYOffset() 

refresh()

refresh() 

render()

render(string  $outputDestination = null) : boolean

Render the chart to given file (or stream).

Parameters

string $outputDestination

Name of the file render to

Returns

boolean —

true on success