class Annotation extends ConfigObject (View source)

Properties

bool $highContrast The highContrast state.
TextStyle $textStyle Style of the annotation.

Methods

mixed
__construct( array $config = array())

Builds the Annotation object.

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.

highContrast( bool $highContrast)

For charts that support annotations, the highContrast bool lets you override Google Charts' choice of the annotation color. By default, highContrast is true, which causes Charts to select an annotation color with good contrast: light colors on dark backgrounds, and dark on light.

textStyle( TextStyle $textStyle)

An object that specifies the annotation text style.

Details

at line 45
mixed __construct( array $config = array())

Builds the Annotation object.

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 61
Annotation highContrast( bool $highContrast)

For charts that support annotations, the highContrast bool lets you override Google Charts' choice of the annotation color. By default, highContrast is true, which causes Charts to select an annotation color with good contrast: light colors on dark backgrounds, and dark on light.

If you set highContrast to false and don't specify your own annotation color, Google Charts will use the default series color for the annotation

Parameters

bool $highContrast Annotation color

Return Value

Annotation

at line 81
Annotation textStyle( TextStyle $textStyle)

An object that specifies the annotation text style.

Parameters

TextStyle $textStyle Style of the annotation

Return Value

Annotation