Class \avadim\FastExcelWriter\Charts\Chart
On this page
- __construct()
- Parameters
- make()
- Parameters
- addDataSeriesSet()
- Parameters
- addDataSeriesType()
- Parameters
- addDataSeriesType2()
- Parameters
- addDataSeriesValues()
- Parameters
- getBottomRightCell()
- Parameters
- getBottomRightOffset()
- Parameters
- getBottomRightPosition()
- Parameters
- getBottomRightXOffset()
- Parameters
- getBottomRightYOffset()
- Parameters
- getCategoryAxisTitle()
- Parameters
- getChartAxisX()
- Parameters
- getChartAxisY()
- Parameters
- getChartAxisY2()
- Parameters
- getDisplayBlanksAs()
- Parameters
- getLegend()
- Parameters
- getMajorGridlines()
- Parameters
- getMinorGridlines()
- Parameters
- getName()
- Parameters
- getPlotArea()
- Parameters
- getPlotChartTypes()
- Parameters
- getPlotVisibleOnly()
- Parameters
- getTitle()
- Parameters
- getTopLeftCell()
- Parameters
- getTopLeftOffset()
- Parameters
- getTopLeftPosition()
- Parameters
- getTopLeftXOffset()
- Parameters
- getTopLeftYOffset()
- Parameters
- getValueAxisTitle()
- Parameters
- getValueAxisTitle2()
- Parameters
- setBottomRightCell()
- Parameters
- setBottomRightOffset()
- Parameters
- setBottomRightXOffset()
- Parameters
- setBottomRightYOffset()
- Parameters
- setCategoryAxis()
- Parameters
- setCategoryAxisLabels()
- Parameters
- setCategoryAxisTitle()
- Parameters
- setChartColors()
- Parameters
- setChartType()
- Parameters
- setDataSeriesNames()
- Parameters
- setDataSeriesTickLabels()
- Parameters
- setDisplayBlanksAs()
- Parameters
- setLegend()
- Parameters
- setLegendPosition()
- Parameters
- setLegendPositionBottom()
- Parameters
- setLegendPositionLeft()
- Parameters
- setLegendPositionRight()
- Parameters
- setLegendPositionTop()
- Parameters
- setName()
- Parameters
- setPlotArea()
- Parameters
- setPlotLayout()
- Parameters
- setPlotShowPercent()
- Parameters
- setPlotShowValues()
- Parameters
- setPlotVisibleOnly()
- Parameters
- setPosition()
- Parameters
- setSheet()
- Parameters
- setTitle()
- Parameters
- setTopLeftCell()
- Parameters
- setTopLeftOffset()
- Parameters
- setTopLeftPosition()
- Parameters
- setTopLeftXOffset()
- Parameters
- setTopLeftYOffset()
- Parameters
- setValueAxisTitle()
- Parameters
- setValueAxisTitle2()
- Parameters
- __construct() – Chart constructor
- make() – Create Chart instance
- addDataSeriesSet() – Add multiple data series to the chart
- addDataSeriesType() – Add data series of specific type (used for combo charts)
- addDataSeriesType2() – Add data series of specific type to the second axis (used for combo charts)
- addDataSeriesValues() – Add data series values to the chart
- getBottomRightCell() – Get the cell address where the bottom right of the chart is fixed
- getBottomRightOffset() – Get the offset position within the Bottom Right cell for the chart
- getBottomRightPosition() – Get the bottom right position of the chart
- getBottomRightXOffset() – Get Bottom Right X-Offset
- getBottomRightYOffset() – Get Bottom Right Y-Offset
- getCategoryAxisTitle() – Get Category Axis Title
- getChartAxisX() – Get X Axis
- getChartAxisY() – Get Y Axis
- getChartAxisY2() – Get Y Axis 2
- getDisplayBlanksAs() – Get Display Blanks As
- getLegend() – Get Chart Legend
- getMajorGridlines() – Get Major Gridlines
- getMinorGridlines() – Get Minor Gridlines
- getName() – Get Chart Name
- getPlotArea() – Get Plot Area
- getPlotChartTypes() – Get the data series type(s) for a chart plot series
- getPlotVisibleOnly() – Get Plot Visible Only
- getTitle() – Get Chart Title
- getTopLeftCell() – Get the cell address where the top left of the chart is fixed
- getTopLeftOffset() – Get the offset position within the Top Left cell for the chart
- getTopLeftPosition() – Get the top left position of the chart
- getTopLeftXOffset() – Get Top Left X-Offset
- getTopLeftYOffset() – Get Top Left Y-Offset
- getValueAxisTitle() – Get Value Axis Title
- getValueAxisTitle2() – Get Y2 Axis Title
- setBottomRightCell() – Set Bottom Right Cell
- setBottomRightOffset() – Set the offset position within the Bottom Right cell for the chart
- setBottomRightXOffset() – Set Bottom Right X-Offset
- setBottomRightYOffset() – Set Bottom Right Y-Offset
- setCategoryAxis() – Set Category Axis Labels and Title
- setCategoryAxisLabels() – Set Category Axis Labels (tick labels)
- setCategoryAxisTitle() – Set Category Axis Title
- setChartColors() – Set Chart Colors
- setChartType() – Set Chart Type
- setDataSeriesNames() – Set Data Series Names
- setDataSeriesTickLabels() – Set Data Series Tick Labels
- setDisplayBlanksAs() – Set Display Blanks As
- setLegend() – Set Chart Legend
- setLegendPosition() – Set Chart Legend Position
- setLegendPositionBottom() – Set Chart Legend Position to Bottom
- setLegendPositionLeft() – Set Chart Legend Position to Left
- setLegendPositionRight() – Set Chart Legend Position to Right
- setLegendPositionTop() – Set Chart Legend Position to Top
- setName() – Set Chart Name
- setPlotArea() – Set Chart Plot Area
- setPlotLayout() – Set Plot Layout
- setPlotShowPercent() – Set Plot Show Percent
- setPlotShowValues() – Set Plot Show Values
- setPlotVisibleOnly() – Set Plot Visible Only
- setPosition() – Set the Bottom Right position of the chart
- setSheet() – Set Sheet
- setTitle() – Set Chart Title
- setTopLeftCell() – Set the Top Left cell position for the chart
- setTopLeftOffset() – Set the offset position within the Top Left cell for the chart
- setTopLeftPosition() – Set the Top Left position for the chart
- setTopLeftXOffset() – Set Top Left X-Offset
- setTopLeftYOffset() – Set Top Left Y-Offset
- setValueAxisTitle() – Set Value Axis Title
- setValueAxisTitle2() – Set Y2 Axis Title
__construct()
public function __construct($title, $plotArea, ?Legend $legend = null,
?bool $plotVisibleOnly = true,
?string $displayBlanksAs = '0', $xAxisLabel,
$yAxisLabel, ?Axis $xAxis = null,
?Axis $yAxis = null,
?GridLines $majorGridlines = null,
?GridLines $minorGridlines = null)
Chart constructor
Parameters
Title|string $titlePlotArea|array $plotAreaLegend|null $legendbool|null $plotVisibleOnlystring|null $displayBlanksAsTitle|string|null $xAxisLabelTitle|string|null $yAxisLabelAxis|null $xAxisAxis|null $yAxisGridLines|null $majorGridlinesGridLines|null $minorGridlines
make()
public static function make(string $chartType, $title, $dataSource): Chart
Create Chart instance
Parameters
string $chartTypeTitle|string|null $titleDataSeries|PlotArea|array|null $dataSource
addDataSeriesSet()
public function addDataSeriesSet(array $dataSources): Chart
Add multiple data series to the chart
Parameters
array $dataSources
addDataSeriesType()
public function addDataSeriesType(string $chartType, $dataSource,
?string $dataLabel = null,
?array $options = []): Chart
Add data series of specific type (used for combo charts)
Parameters
string $chartTypeDataSeriesValues|string $dataSourcestring|null $dataLabelarray|null $options
addDataSeriesType2()
public function addDataSeriesType2(string $chartType, $dataSource,
?string $dataLabel = null,
?array $options = []): Chart
Add data series of specific type to the second axis (used for combo charts)
Parameters
string $chartTypeDataSeriesValues|string $dataSourcestring|null $dataLabelarray|null $options
addDataSeriesValues()
public function addDataSeriesValues($dataSource, ?string $dataLabel = null,
?array $options = []): Chart
Add data series values to the chart
Parameters
DataSeriesValues|array|string $dataSourcestring|null $dataLabelarray|null $options
getBottomRightCell()
public function getBottomRightCell(): string
Get the cell address where the bottom right of the chart is fixed
Parameters
None
getBottomRightOffset()
public function getBottomRightOffset(): array
Get the offset position within the Bottom Right cell for the chart
Parameters
None
getBottomRightPosition()
public function getBottomRightPosition(): array
Get the bottom right position of the chart
Parameters
None
getBottomRightXOffset()
public function getBottomRightXOffset(): int
Get Bottom Right X-Offset
Parameters
None
getBottomRightYOffset()
public function getBottomRightYOffset(): int
Get Bottom Right Y-Offset
Parameters
None
getCategoryAxisTitle()
public function getCategoryAxisTitle(): ?Title
Get Category Axis Title
Parameters
None
getChartAxisX()
public function getChartAxisX(): ?Axis
Get X Axis
Parameters
None
getChartAxisY()
public function getChartAxisY(): ?Axis
Get Y Axis
Parameters
None
getChartAxisY2()
public function getChartAxisY2(): ?Axis
Get Y Axis 2
Parameters
None
getDisplayBlanksAs()
public function getDisplayBlanksAs(): string
Get Display Blanks As
Parameters
None
getLegend()
public function getLegend(): ?Legend
Get Chart Legend
Parameters
None
getMajorGridlines()
public function getMajorGridlines(): ?GridLines
Get Major Gridlines
Parameters
None
getMinorGridlines()
public function getMinorGridlines(): ?GridLines
Get Minor Gridlines
Parameters
None
getName()
public function getName(): string
Get Chart Name
Parameters
None
getPlotArea()
public function getPlotArea(): PlotArea
Get Plot Area
Parameters
None
getPlotChartTypes()
public function getPlotChartTypes(): array
Get the data series type(s) for a chart plot series
Parameters
None
getPlotVisibleOnly()
public function getPlotVisibleOnly(): bool
Get Plot Visible Only
Parameters
None
getTitle()
public function getTitle(): Title
Get Chart Title
Parameters
None
getTopLeftCell()
public function getTopLeftCell(): string
Get the cell address where the top left of the chart is fixed
Parameters
None
getTopLeftOffset()
public function getTopLeftOffset(): array
Get the offset position within the Top Left cell for the chart
Parameters
None
getTopLeftPosition()
public function getTopLeftPosition(): array
Get the top left position of the chart
Parameters
None
getTopLeftXOffset()
public function getTopLeftXOffset(): int
Get Top Left X-Offset
Parameters
None
getTopLeftYOffset()
public function getTopLeftYOffset(): int
Get Top Left Y-Offset
Parameters
None
getValueAxisTitle()
public function getValueAxisTitle(): ?Title
Get Value Axis Title
Parameters
None
getValueAxisTitle2()
public function getValueAxisTitle2(): ?Title
Get Y2 Axis Title
Parameters
None
setBottomRightCell()
public function setBottomRightCell(string $cell): Chart
Set Bottom Right Cell
Parameters
string $cell
setBottomRightOffset()
public function setBottomRightOffset(?int $xOffset = null,
?int $yOffset = null): Chart
Set the offset position within the Bottom Right cell for the chart
Parameters
int|null $xOffsetint|null $yOffset
setBottomRightXOffset()
public function setBottomRightXOffset(int $xOffset): Chart
Set Bottom Right X-Offset
Parameters
int $xOffset
setBottomRightYOffset()
public function setBottomRightYOffset(int $yOffset): Chart
Set Bottom Right Y-Offset
Parameters
int $yOffset
setCategoryAxis()
public function setCategoryAxis($labels, $title): Chart
Set Category Axis Labels and Title
Parameters
DataSeriesValues|array|string $labelsTitle|string|null $title
setCategoryAxisLabels()
public function setCategoryAxisLabels($labels): Chart
Set Category Axis Labels (tick labels)
Parameters
DataSeriesValues|array|string $labels
setCategoryAxisTitle()
public function setCategoryAxisTitle($title): Chart
Set Category Axis Title
Parameters
Title|string $title
setChartColors()
public function setChartColors(array $colors): Chart
Set Chart Colors
Parameters
array $colors
setChartType()
public function setChartType(string $chartType): Chart
Set Chart Type
Parameters
string $chartType
setDataSeriesNames()
public function setDataSeriesNames($labels): Chart
Set Data Series Names
Parameters
DataSeriesValues|array|string $labels
setDataSeriesTickLabels()
public function setDataSeriesTickLabels($range): Chart
Set Data Series Tick Labels
Parameters
DataSeriesValues|array|string $range
setDisplayBlanksAs()
public function setDisplayBlanksAs(string $displayBlanksAs = '0'): Chart
Set Display Blanks As
Parameters
string $displayBlanksAs
setLegend()
public function setLegend(avadim\FastExcelWriter\Charts\Legend $legend): Chart
Set Chart Legend
Parameters
Legend $legend
setLegendPosition()
public function setLegendPosition(string $position): Chart
Set Chart Legend Position
Parameters
string $position
setLegendPositionBottom()
public function setLegendPositionBottom(): Chart
Set Chart Legend Position to Bottom
Parameters
None
setLegendPositionLeft()
public function setLegendPositionLeft(): Chart
Set Chart Legend Position to Left
Parameters
None
setLegendPositionRight()
public function setLegendPositionRight(): Chart
Set Chart Legend Position to Right
Parameters
None
setLegendPositionTop()
public function setLegendPositionTop(): Chart
Set Chart Legend Position to Top
Parameters
None
setName()
public function setName(string $name): Chart
Set Chart Name
Parameters
string $name
setPlotArea()
public function setPlotArea($plotValues): Chart
Set Chart Plot Area
Parameters
PlotArea|array $plotValues
setPlotLayout()
public function setPlotLayout($layout): Chart
Set Plot Layout
Parameters
Layout|array|null $layout
setPlotShowPercent()
public function setPlotShowPercent(bool $val): Chart
Set Plot Show Percent
Parameters
bool $val
setPlotShowValues()
public function setPlotShowValues(bool $val): Chart
Set Plot Show Values
Parameters
bool $val
setPlotVisibleOnly()
public function setPlotVisibleOnly(bool $plotVisibleOnly = true): Chart
Set Plot Visible Only
Parameters
bool $plotVisibleOnly
setPosition()
public function setPosition(string $cell, ?int $xOffset = null,
?int $yOffset = null): Chart
Set the Bottom Right position of the chart
Parameters
string $cellint|null $xOffsetint|null $yOffset
setSheet()
public function setSheet(avadim\FastExcelWriter\Sheet $sheet): Chart
Set Sheet
Parameters
Sheet $sheet
setTitle()
public function setTitle($title): Chart
Set Chart Title
Parameters
Title|string $title
setTopLeftCell()
public function setTopLeftCell(string $cell): Chart
Set the Top Left cell position for the chart
Parameters
string $cell
setTopLeftOffset()
public function setTopLeftOffset(?int $xOffset = null,
?int $yOffset = null): Chart
Set the offset position within the Top Left cell for the chart
Parameters
integer|null $xOffsetinteger|null $yOffset
setTopLeftPosition()
public function setTopLeftPosition(string $cell, ?int $xOffset = null,
?int $yOffset = null): Chart
Set the Top Left position for the chart
Parameters
string $cellinteger|null $xOffsetinteger|null $yOffset
setTopLeftXOffset()
public function setTopLeftXOffset($xOffset): Chart
Set Top Left X-Offset
Parameters
int $xOffset
setTopLeftYOffset()
public function setTopLeftYOffset($yOffset): Chart
Set Top Left Y-Offset
Parameters
int $yOffset
setValueAxisTitle()
public function setValueAxisTitle($title): Chart
Set Value Axis Title
Parameters
Title|string $title
setValueAxisTitle2()
public function setValueAxisTitle2($title): Chart
Set Y2 Axis Title
Parameters
Title|string $title