Documentation

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.
$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.
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
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

$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

$name

Chart Name.

private string $name

$noFill

private bool $noFill = false

$oneCellAnchor

private bool $oneCellAnchor = false

$perspective

private int|null $perspective = null

$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

$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

$xAxisLabel

X-Axis Label.

private Title|null $xAxisLabel

$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
bool

getBottomRightCell()

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

public getBottomRightCell() : string
Return values
string

getBottomRightOffset()

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
int

getBottomRightYOffset()

public getBottomRightYOffset() : int
Return values
int

getDisplayBlanksAs()

Get Display Blanks as.

public getDisplayBlanksAs() : string
Return values
string

getName()

Get Name.

public getName() : string
Return values
string

getNoFill()

public getNoFill() : bool
Return values
bool

getOneCellAnchor()

public getOneCellAnchor() : bool
Return values
bool

getPerspective()

public getPerspective() : int|null
Return values
int|null

getPlotVisibleOnly()

Get Plot Visible Only.

public getPlotVisibleOnly() : bool
Return values
bool

getRAngAx()

public getRAngAx() : int|null
Return values
int|null

getRenderedHeight()

public getRenderedHeight() : float|null
Return values
float|null

getRenderedWidth()

public getRenderedWidth() : float|null
Return values
float|null

getRotX()

public getRotX() : int|null
Return values
int|null

getRotY()

public getRotY() : int|null
Return values
int|null

getRoundedCorners()

public getRoundedCorners() : bool
Return values
bool

getTopLeftCell()

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

public getTopLeftCell() : string
Return values
string

getTopLeftOffset()

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
int

getTopLeftYOffset()

public getTopLeftYOffset() : int
Return values
int

refresh()

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
self

setBorderLines()

public setBorderLines(GridLines $borderLines) : self
Parameters
$borderLines : GridLines
Return values
self

setBottomRightCell()

Set the Bottom Right cell for the chart.

public setBottomRightCell([string $cellAddress = '' ]) : $this
Parameters
$cellAddress : string = ''
Return values
$this

setBottomRightOffset()

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
$this

setBottomRightPosition()

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
$this

setBottomRightXOffset()

public setBottomRightXOffset(int $xOffset) : $this
Parameters
$xOffset : int
Return values
$this

setBottomRightYOffset()

public setBottomRightYOffset(int $yOffset) : $this
Parameters
$yOffset : int
Return values
$this

setChartAxisX()

Set xAxis.

public setChartAxisX(Axis|null $axis) : self
Parameters
$axis : Axis|null
Return values
self

setChartAxisY()

Set yAxis.

public setChartAxisY(Axis|null $axis) : self
Parameters
$axis : Axis|null
Return values
self

setDisplayBlanksAs()

Set Display Blanks as.

public setDisplayBlanksAs(string $displayBlanksAs) : $this
Parameters
$displayBlanksAs : string
Return values
$this

setLegend()

Set Legend.

public setLegend(Legend $legend) : $this
Parameters
$legend : Legend
Return values
$this

setName()

public setName(string $name) : self
Parameters
$name : string
Return values
self

setNoFill()

public setNoFill(bool $noFill) : self
Parameters
$noFill : bool
Return values
self

setOneCellAnchor()

public setOneCellAnchor(bool $oneCellAnchor) : self
Parameters
$oneCellAnchor : bool
Return values
self

setPerspective()

public setPerspective(int|null $perspective) : self
Parameters
$perspective : int|null
Return values
self

setPlotArea()

Set Plot Area.

public setPlotArea(PlotArea $plotArea) : self
Parameters
$plotArea : PlotArea
Return values
self

setPlotVisibleOnly()

Set Plot Visible Only.

public setPlotVisibleOnly(bool $plotVisibleOnly) : $this
Parameters
$plotVisibleOnly : bool
Return values
$this

setRAngAx()

public setRAngAx(int|null $rAngAx) : self
Parameters
$rAngAx : int|null
Return values
self

setRenderedHeight()

public setRenderedHeight(float|null $height) : self
Parameters
$height : float|null
Return values
self

setRenderedWidth()

public setRenderedWidth(float|null $width) : self
Parameters
$width : float|null
Return values
self

setRotX()

public setRotX(int|null $rotX) : self
Parameters
$rotX : int|null
Return values
self

setRotY()

public setRotY(int|null $rotY) : self
Parameters
$rotY : int|null
Return values
self

setRoundedCorners()

public setRoundedCorners(bool|null $roundedCorners) : self
Parameters
$roundedCorners : bool|null
Return values
self

setTitle()

Set Title.

public setTitle(Title $title) : $this
Parameters
$title : Title
Return values
$this

setTopLeftCell()

Set the Top Left cell position for the chart.

public setTopLeftCell(string $cellAddress) : $this
Parameters
$cellAddress : string
Return values
$this

setTopLeftOffset()

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
$this

setTopLeftPosition()

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
$this

setTopLeftXOffset()

public setTopLeftXOffset(int $xOffset) : $this
Parameters
$xOffset : int
Return values
$this

setTopLeftYOffset()

public setTopLeftYOffset(int $yOffset) : $this
Parameters
$yOffset : int
Return values
$this

setWorksheet()

Set Worksheet.

public setWorksheet([Worksheet|null $worksheet = null ]) : $this
Parameters
$worksheet : Worksheet|null = null
Return values
$this

setXAxisLabel()

Set X-Axis Label.

public setXAxisLabel(Title $label) : $this
Parameters
$label : Title
Return values
$this

setYAxisLabel()

Set Y-Axis Label.

public setYAxisLabel(Title $label) : $this
Parameters
$label : Title
Return values
$this

        
On this page

Search results