class ColorAxis extends JsonConfig (View source)

ColorAxis Object

An object that specifies a mapping between color column values and colors or a gradient scale.

Constants

TYPE

Type of JsonConfig object

Methods

__construct( array $config = array())

Builds the ColorAxis object with specified options

mixed
__get( string $option)

Get the value of a set option via magic method.

from  JsonConfig
getOptions()

Gets the Options object for the JsonConfig

from  JsonConfig
setOption( string $option, mixed $value)

Shortcut method to set the value of an option and return $this.

from  JsonConfig
setOptions( array $config)

Parses the config array by passing the values through each method to check validity against if the option exists.

from  JsonConfig
array
jsonSerialize()

Custom serialization of the JsonConfig object.

from  JsonConfig
minValue( int|float $minValue)

If present, specifies a minimum value for chart color data. Color data values of this value and lower will be rendered as the first color in the $this->colors range.

maxValue( int|float $maxValue)

If present, specifies a maximum value for chart color data. Color data values of this value and higher will be rendered as the last color in the $this->colors range.

values( array $values)

If present, controls how values are associated with colors. Each value is associated with the corresponding color in the $this->colors array.

colors( array $colors)

Colors to assign to values in the visualization. An array of strings, where each element is an HTML color string.

Details

at line 54
__construct( array $config = array())

Builds the ColorAxis object with specified options

Parameters

array $config

Exceptions

InvalidConfigValue
InvalidConfigProperty

in JsonConfig at line 64
mixed __get( string $option)

Get the value of a set option via magic method.

Parameters

string $option Name of option.

Return Value

mixed

Exceptions

InvalidConfigProperty

in JsonConfig at line 75
Options getOptions()

Gets the Options object for the JsonConfig

Return Value

Options

in JsonConfig at line 90
JsonConfig setOption( string $option, mixed $value)

Shortcut method to set the value of an option and return $this.

In order to maintain backwards compatibility, ConfigObjects will be unwrapped.

Parameters

string $option Option to set.
mixed $value Value of the option.

Return Value

JsonConfig

in JsonConfig at line 106
setOptions( array $config)

Parses the config array by passing the values through each method to check validity against if the option exists.

Parameters

array $config

Exceptions

InvalidConfigValue
InvalidConfigProperty

in JsonConfig at line 275
array jsonSerialize()

Custom serialization of the JsonConfig object.

Return Value

array

at line 70
ColorAxis minValue( int|float $minValue)

If present, specifies a minimum value for chart color data. Color data values of this value and lower will be rendered as the first color in the $this->colors range.

Parameters

int|float $minValue

Return Value

ColorAxis

Exceptions

InvalidConfigValue

at line 84
ColorAxis maxValue( int|float $maxValue)

If present, specifies a maximum value for chart color data. Color data values of this value and higher will be rendered as the last color in the $this->colors range.

Parameters

int|float $maxValue

Return Value

ColorAxis

Exceptions

InvalidConfigValue

at line 102
ColorAxis values( array $values)

If present, controls how values are associated with colors. Each value is associated with the corresponding color in the $this->colors array.

These values apply to the chart color data.

Coloring is done according to a gradient of the values specified here. Not specifying a value for this option is equivalent to specifying [minValue, maxValue].

Parameters

array $values

Return Value

ColorAxis

Exceptions

InvalidConfigValue

at line 128
ColorAxis colors( array $colors)

Colors to assign to values in the visualization. An array of strings, where each element is an HTML color string.

For example: ['red', '#004411'] You must have at least two values; the gradient will include all your values, plus calculated intermediary values, with the first color as the smallest value, and the last color as the highest.

Parameters

array $colors

Return Value

ColorAxis

Exceptions

InvalidConfigValue