class ColorAxis extends ConfigObject (View source)

Properties

int $minValue Minimum value for chart color data.
int $maxValue Maximum value for chart color data.
array $values Controls how values are associated with colors.
array $colors Colors to assign to values in the visualization.

Methods

mixed
__construct( array $config = array())

Builds the ColorAxis object with specified options

array
toArray( string $keyName = null)

Returns an array representation of the object.

array
getValues()

Same as toArray, but without the class name as a key to being multi-dimension.

minValue( numeric $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( numeric $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 60
mixed __construct( array $config = array())

Builds the ColorAxis object with specified options

Parameters

array $config Array of options.

Return Value

mixed

Exceptions

InvalidConfigValue
InvalidConfigProperty

in ConfigObject at line 93
array toArray( string $keyName = null)

Returns an array representation of the object.

If passed a label, then the array will be returned with the label as the key.

Called with no label returns an array with the classname as the key.

Parameters

string $keyName Key name to be applied to generated array.

Return Value

array Assoc. array of the options of the object.

in ConfigObject at line 115
array getValues()

Same as toArray, but without the class name as a key to being multi-dimension.

Return Value

array Array of the options of the object.

at line 74
ColorAxis minValue( numeric $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

numeric $minValue

Return Value

ColorAxis

Exceptions

InvalidConfigValue

at line 97
ColorAxis maxValue( numeric $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

numeric $maxValue

Return Value

ColorAxis

Exceptions

InvalidConfigValue

at line 124
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 152
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: $this->colors = array('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