Class \avadim\FastExcelWriter\Charts\Chart

Source: 6.19.2 · 0608684

On this page


__construct()


php
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 $title
  • PlotArea|array $plotArea
  • Legend|null $legend
  • bool|null $plotVisibleOnly
  • string|null $displayBlanksAs
  • Title|string|null $xAxisLabel
  • Title|string|null $yAxisLabel
  • Axis|null $xAxis
  • Axis|null $yAxis
  • GridLines|null $majorGridlines
  • GridLines|null $minorGridlines

make()


php
public static function make(string $chartType, $title, $dataSource): Chart

Create Chart instance

Parameters

  • string $chartType
  • Title|string|null $title
  • DataSeries|PlotArea|array|null $dataSource

addDataSeriesSet()


php
public function addDataSeriesSet(array $dataSources): Chart

Add multiple data series to the chart

Parameters

  • array $dataSources

addDataSeriesType()


php
public function addDataSeriesType(string $chartType, $dataSource, 
                                  ?string $dataLabel = null, 
                                  ?array $options = []): Chart

Add data series of specific type (used for combo charts)

Parameters

  • string $chartType
  • DataSeriesValues|string $dataSource
  • string|null $dataLabel
  • array|null $options

addDataSeriesType2()


php
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 $chartType
  • DataSeriesValues|string $dataSource
  • string|null $dataLabel
  • array|null $options

addDataSeriesValues()


php
public function addDataSeriesValues($dataSource, ?string $dataLabel = null, 
                                    ?array $options = []): Chart

Add data series values to the chart

Parameters

  • DataSeriesValues|array|string $dataSource
  • string|null $dataLabel
  • array|null $options

getBottomRightCell()


php
public function getBottomRightCell(): string

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

Parameters

None


getBottomRightOffset()


php
public function getBottomRightOffset(): array

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

Parameters

None


getBottomRightPosition()


php
public function getBottomRightPosition(): array

Get the bottom right position of the chart

Parameters

None


getBottomRightXOffset()


php
public function getBottomRightXOffset(): int

Get Bottom Right X-Offset

Parameters

None


getBottomRightYOffset()


php
public function getBottomRightYOffset(): int

Get Bottom Right Y-Offset

Parameters

None


getCategoryAxisTitle()


php
public function getCategoryAxisTitle(): ?Title

Get Category Axis Title

Parameters

None


getChartAxisX()


php
public function getChartAxisX(): ?Axis

Get X Axis

Parameters

None


getChartAxisY()


php
public function getChartAxisY(): ?Axis

Get Y Axis

Parameters

None


getChartAxisY2()


php
public function getChartAxisY2(): ?Axis

Get Y Axis 2

Parameters

None


getDisplayBlanksAs()


php
public function getDisplayBlanksAs(): string

Get Display Blanks As

Parameters

None


getLegend()


php
public function getLegend(): ?Legend

Get Chart Legend

Parameters

None


getMajorGridlines()


php
public function getMajorGridlines(): ?GridLines

Get Major Gridlines

Parameters

None


getMinorGridlines()


php
public function getMinorGridlines(): ?GridLines

Get Minor Gridlines

Parameters

None


getName()


php
public function getName(): string

Get Chart Name

Parameters

None


getPlotArea()


php
public function getPlotArea(): PlotArea

Get Plot Area

Parameters

None


getPlotChartTypes()


php
public function getPlotChartTypes(): array

Get the data series type(s) for a chart plot series

Parameters

None


getPlotVisibleOnly()


php
public function getPlotVisibleOnly(): bool

Get Plot Visible Only

Parameters

None


getTitle()


php
public function getTitle(): Title

Get Chart Title

Parameters

None


getTopLeftCell()


php
public function getTopLeftCell(): string

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

Parameters

None


getTopLeftOffset()


php
public function getTopLeftOffset(): array

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

Parameters

None


getTopLeftPosition()


php
public function getTopLeftPosition(): array

Get the top left position of the chart

Parameters

None


getTopLeftXOffset()


php
public function getTopLeftXOffset(): int

Get Top Left X-Offset

Parameters

None


getTopLeftYOffset()


php
public function getTopLeftYOffset(): int

Get Top Left Y-Offset

Parameters

None


getValueAxisTitle()


php
public function getValueAxisTitle(): ?Title

Get Value Axis Title

Parameters

None


getValueAxisTitle2()


php
public function getValueAxisTitle2(): ?Title

Get Y2 Axis Title

Parameters

None


setBottomRightCell()


php
public function setBottomRightCell(string $cell): Chart

Set Bottom Right Cell

Parameters

  • string $cell

setBottomRightOffset()


php
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 $xOffset
  • int|null $yOffset

setBottomRightXOffset()


php
public function setBottomRightXOffset(int $xOffset): Chart

Set Bottom Right X-Offset

Parameters

  • int $xOffset

setBottomRightYOffset()


php
public function setBottomRightYOffset(int $yOffset): Chart

Set Bottom Right Y-Offset

Parameters

  • int $yOffset

setCategoryAxis()


php
public function setCategoryAxis($labels, $title): Chart

Set Category Axis Labels and Title

Parameters

  • DataSeriesValues|array|string $labels
  • Title|string|null $title

setCategoryAxisLabels()


php
public function setCategoryAxisLabels($labels): Chart

Set Category Axis Labels (tick labels)

Parameters

  • DataSeriesValues|array|string $labels

setCategoryAxisTitle()


php
public function setCategoryAxisTitle($title): Chart

Set Category Axis Title

Parameters

  • Title|string $title

setChartColors()


php
public function setChartColors(array $colors): Chart

Set Chart Colors

Parameters

  • array $colors

setChartType()


php
public function setChartType(string $chartType): Chart

Set Chart Type

Parameters

  • string $chartType

setDataSeriesNames()


php
public function setDataSeriesNames($labels): Chart

Set Data Series Names

Parameters

  • DataSeriesValues|array|string $labels

setDataSeriesTickLabels()


php
public function setDataSeriesTickLabels($range): Chart

Set Data Series Tick Labels

Parameters

  • DataSeriesValues|array|string $range

setDisplayBlanksAs()


php
public function setDisplayBlanksAs(string $displayBlanksAs = '0'): Chart

Set Display Blanks As

Parameters

  • string $displayBlanksAs

setLegend()


php
public function setLegend(avadim\FastExcelWriter\Charts\Legend $legend): Chart

Set Chart Legend

Parameters

  • Legend $legend

setLegendPosition()


php
public function setLegendPosition(string $position): Chart

Set Chart Legend Position

Parameters

  • string $position

setLegendPositionBottom()


php
public function setLegendPositionBottom(): Chart

Set Chart Legend Position to Bottom

Parameters

None


setLegendPositionLeft()


php
public function setLegendPositionLeft(): Chart

Set Chart Legend Position to Left

Parameters

None


setLegendPositionRight()


php
public function setLegendPositionRight(): Chart

Set Chart Legend Position to Right

Parameters

None


setLegendPositionTop()


php
public function setLegendPositionTop(): Chart

Set Chart Legend Position to Top

Parameters

None


setName()


php
public function setName(string $name): Chart

Set Chart Name

Parameters

  • string $name

setPlotArea()


php
public function setPlotArea($plotValues): Chart

Set Chart Plot Area

Parameters

  • PlotArea|array $plotValues

setPlotLayout()


php
public function setPlotLayout($layout): Chart

Set Plot Layout

Parameters

  • Layout|array|null $layout

setPlotShowPercent()


php
public function setPlotShowPercent(bool $val): Chart

Set Plot Show Percent

Parameters

  • bool $val

setPlotShowValues()


php
public function setPlotShowValues(bool $val): Chart

Set Plot Show Values

Parameters

  • bool $val

setPlotVisibleOnly()


php
public function setPlotVisibleOnly(bool $plotVisibleOnly = true): Chart

Set Plot Visible Only

Parameters

  • bool $plotVisibleOnly

setPosition()


php
public function setPosition(string $cell, ?int $xOffset = null, 
                            ?int $yOffset = null): Chart

Set the Bottom Right position of the chart

Parameters

  • string $cell
  • int|null $xOffset
  • int|null $yOffset

setSheet()


php
public function setSheet(avadim\FastExcelWriter\Sheet $sheet): Chart

Set Sheet

Parameters

  • Sheet $sheet

setTitle()


php
public function setTitle($title): Chart

Set Chart Title

Parameters

  • Title|string $title

setTopLeftCell()


php
public function setTopLeftCell(string $cell): Chart

Set the Top Left cell position for the chart

Parameters

  • string $cell

setTopLeftOffset()


php
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 $xOffset
  • integer|null $yOffset

setTopLeftPosition()


php
public function setTopLeftPosition(string $cell, ?int $xOffset = null, 
                                   ?int $yOffset = null): Chart

Set the Top Left position for the chart

Parameters

  • string $cell
  • integer|null $xOffset
  • integer|null $yOffset

setTopLeftXOffset()


php
public function setTopLeftXOffset($xOffset): Chart

Set Top Left X-Offset

Parameters

  • int $xOffset

setTopLeftYOffset()


php
public function setTopLeftYOffset($yOffset): Chart

Set Top Left Y-Offset

Parameters

  • int $yOffset

setValueAxisTitle()


php
public function setValueAxisTitle($title): Chart

Set Value Axis Title

Parameters

  • Title|string $title

setValueAxisTitle2()


php
public function setValueAxisTitle2($title): Chart

Set Y2 Axis Title

Parameters

  • Title|string $title

FastExcelWriter 6.19.2 · Search this library and version.

Loading search…

Could not load search. Please try again.

No results. Try another word or method name.