class Annotation extends JsonConfig (View source)

Annotation ConfigObject

An object containing all the values for the annotation which can be passed into the chart's options.

Constants

TYPE

Type of JsonConfig object

Methods

__construct( array $config = array())

Builds the Annotation object.

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
alwaysOutside( bool $alwaysOutside)

In Bar and Column charts, if set to true, draws all annotations outside of the Bar/Column.

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( array $textStyleConfig)

An object that specifies the annotation text style.

Details

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

Builds the Annotation object.

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 65
Annotation alwaysOutside( bool $alwaysOutside)

In Bar and Column charts, if set to true, draws all annotations outside of the Bar/Column.

Parameters

bool $alwaysOutside

Return Value

Annotation

Exceptions

InvalidConfigValue

at line 82
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

Return Value

Annotation

Exceptions

InvalidConfigValue

at line 94
Annotation textStyle( array $textStyleConfig)

An object that specifies the annotation text style.

Parameters

array $textStyleConfig Style of the annotation

Return Value

Annotation

Exceptions

InvalidConfigValue