Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401] [Versions 401 and 402] [Versions 401 and 403]

(no description)

File Size: 595 lines (14 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: DataSeriesValues  - X-Ref

__construct($dataType = self::DATASERIES_TYPE_NUMBER, $dataSource = null, $formatCode = null, $pointCount = 0, $dataValues = [], $marker = null, $fillColor = null, $pointSize = '3')   X-Ref
Create a new DataSeriesValues object.

param: string $dataType
param: string $dataSource
param: null|mixed $formatCode
param: int $pointCount
param: mixed $dataValues
param: null|mixed $marker
param: null|ChartColor|ChartColor[]|string|string[] $fillColor
param: string $pointSize

getDataType()   X-Ref
Get Series Data Type.

return: string

setDataType($dataType)   X-Ref
Set Series Data Type.

param: string $dataType Datatype of this data series
return: $this

getDataSource()   X-Ref
Get Series Data Source (formula).

return: ?string

setDataSource($dataSource)   X-Ref
Set Series Data Source (formula).

param: ?string $dataSource
return: $this

getPointMarker()   X-Ref
Get Point Marker.

return: string

setPointMarker($marker)   X-Ref
Set Point Marker.

param: string $marker
return: $this

getMarkerFillColor()   X-Ref
No description

getMarkerBorderColor()   X-Ref
No description

getPointSize()   X-Ref
Get Point Size.


setPointSize(int $size = 3)   X-Ref
Set Point Size.

return: $this

getFormatCode()   X-Ref
Get Series Format Code.

return: string

setFormatCode($formatCode)   X-Ref
Set Series Format Code.

param: string $formatCode
return: $this

getPointCount()   X-Ref
Get Series Point Count.

return: int

getFillColorObject()   X-Ref
Get fill color object.

return: null|ChartColor|ChartColor[]

stringToChartColor(string $fillString)   X-Ref
No description

chartColorToString(ChartColor $chartColor)   X-Ref
No description

getFillColor()   X-Ref
Get fill color.

return: string|string[] HEX color or array with HEX colors

setFillColor($color)   X-Ref
Set fill color for series.

param: ChartColor|ChartColor[]|string|string[] $color HEX color or array with HEX colors
return: DataSeriesValues

validateColor($color)   X-Ref
Method for validating hex color.

param: string $color value for color
return: bool true if validation was successful

getLineWidth()   X-Ref
Get line width for series.

return: null|float|int

setLineWidth($width)   X-Ref
Set line width for the series.

param: null|float|int $width
return: $this

isMultiLevelSeries()   X-Ref
Identify if the Data Series is a multi-level or a simple series.

return: null|bool

multiLevelCount()   X-Ref
Return the level count of a multi-level Data Series.

return: int

getDataValues()   X-Ref
Get Series Data Values.

return: mixed[]

getDataValue()   X-Ref
Get the first Series Data value.

return: mixed

setDataValues($dataValues)   X-Ref
Set Series Data Values.

param: array $dataValues
return: $this

refresh(Worksheet $worksheet, bool $flatten = true)   X-Ref
No description

getScatterLines()   X-Ref
No description

setScatterLines(bool $scatterLines)   X-Ref
No description

getBubble3D()   X-Ref
No description

setBubble3D(bool $bubble3D)   X-Ref
No description

getSmoothLine()   X-Ref
Get Smooth Line.

return: bool

setSmoothLine($smoothLine)   X-Ref
Set Smooth Line.

param: bool $smoothLine
return: $this

getLabelLayout()   X-Ref
No description

setLabelLayout(?Layout $labelLayout)   X-Ref
No description

setTrendLines(array $trendLines)   X-Ref
No description

getTrendLines()   X-Ref
No description