class Tooltip extends JsonConfig (View source)

Tooltip ConfigObject

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

Constants

TYPE

Type of JsonConfig object

Methods

__construct( array $config = array())

Builds the tooltip 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
isHtml( bool $isHtml)

Sets whether the tooltip is HTML.

showColorCode( bool $showColorCode)

Sets whether to show the color code.

textStyle( array $textStyleConfig)

Sets the text style of the tooltip.

trigger( string $trigger)

Sets the user interaction that causes the tooltip to be displayed.

Details

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

Builds the tooltip 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 66
Tooltip isHtml( bool $isHtml)

Sets whether the tooltip is HTML.

Parameters

bool $isHtml

Return Value

Tooltip

Exceptions

InvalidConfigValue

at line 78
Tooltip showColorCode( bool $showColorCode)

Sets whether to show the color code.

Parameters

bool $showColorCode State of showing the color code.

Return Value

Tooltip

Exceptions

InvalidConfigValue

at line 90
Tooltip textStyle( array $textStyleConfig)

Sets the text style of the tooltip.

Parameters

array $textStyleConfig

Return Value

Tooltip

Exceptions

InvalidConfigValue

at line 105
Tooltip trigger( string $trigger)

Sets the user interaction that causes the tooltip to be displayed.

'focus' - The tooltip will be displayed when the user hovers over an element. 'none' - The tooltip will not be displayed.

Parameters

string $trigger Type of trigger.

Return Value

Tooltip

Exceptions

InvalidConfigValue