Constants

DATASERIES_TYPE_STRING

DATASERIES_TYPE_STRING = 'String'

DATASERIES_TYPE_NUMBER

DATASERIES_TYPE_NUMBER = 'Number'

Properties

$dataTypeValues

$dataTypeValues : 

Type

$dataType

$dataType : string

Series Data Type.

Type

string

$dataSource

$dataSource : string

Series Data Source.

Type

string

$formatCode

$formatCode : string

Format Code.

Type

string

$pointMarker

$pointMarker : string

Series Point Marker.

Type

string

$pointCount

$pointCount : integer

Point Count (The number of datapoints in the dataseries).

Type

integer

$dataValues

$dataValues : array

Data Values.

Type

array — of mixed

$fillColor

$fillColor : string

Fill color.

Type

string

$lineWidth

$lineWidth : integer

Line Width.

Type

integer

Methods

__construct()

__construct(string  $dataType = self::DATASERIES_TYPE_NUMBER, string  $dataSource = null, null|mixed  $formatCode = null, integer  $pointCount, mixed  $dataValues = array(), null|mixed  $marker = null, null|string  $fillColor = null) 

Create a new DataSeriesValues object.

Parameters

string $dataType
string $dataSource
null|mixed $formatCode
integer $pointCount
mixed $dataValues
null|mixed $marker
null|string $fillColor

getDataType()

getDataType() : string

Get Series Data Type.

Returns

string

setDataType()

setDataType(string  $dataType) : \PhpOffice\PhpSpreadsheet\Chart\DataSeriesValues

Set Series Data Type.

Parameters

string $dataType

Datatype of this data series Typical values are: DataSeriesValues::DATASERIES_TYPE_STRING Normally used for axis point values DataSeriesValues::DATASERIES_TYPE_NUMBER Normally used for chart data values

Throws

\PhpOffice\PhpSpreadsheet\Chart\Exception

Returns

\PhpOffice\PhpSpreadsheet\Chart\DataSeriesValues

getDataSource()

getDataSource() : string

Get Series Data Source (formula).

Returns

string

getPointMarker()

getPointMarker() : string

Get Point Marker.

Returns

string

getFormatCode()

getFormatCode() : string

Get Series Format Code.

Returns

string

getPointCount()

getPointCount() : integer

Get Series Point Count.

Returns

integer

getFillColor()

getFillColor() : string

Get fill color.

Returns

string —

HEX color

getLineWidth()

getLineWidth() : integer

Get line width for series.

Returns

integer

isMultiLevelSeries()

isMultiLevelSeries() : null|boolean

Identify if the Data Series is a multi-level or a simple series.

Returns

null|boolean

multiLevelCount()

multiLevelCount() : integer

Return the level count of a multi-level Data Series.

Returns

integer

getDataValues()

getDataValues() : array

Get Series Data Values.

Returns

array —

of mixed

getDataValue()

getDataValue() : mixed

Get the first Series Data value.

Returns

mixed