Crosshair
class Crosshair extends JsonConfig (View source)
Crosshair ConfigObject
An object containing the crosshair properties for the chart.
Traits
Constants
TYPE |
Type of JsonConfig object
|
Methods
Stores all the information about the crosshair.
Shortcut method to set the value of an option and return $this.
Parses the config array by passing the values through each method to check validity against if the option exists.
The crosshair opacity, with 0.0 being fully transparent and 1.0 fully opaque.
The crosshair orientation, which can be 'vertical' for vertical hairs only, 'horizontal' for horizontal hairs only, or 'both' for traditional crosshairs.
Details
at line 66
__construct(
array $config = array())
Stores all the information about the crosshair.
All options can be set either by passing an array with associative values for option => value, or by chaining together the functions once an object has been created.
in
JsonConfig at line 64
mixed
__get(
string $option)
Get the value of a set option via magic method.
in
JsonConfig at line 75
Options
getOptions()
Gets the Options object for the JsonConfig
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.
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.
in
JsonConfig at line 275
array
jsonSerialize()
Custom serialization of the JsonConfig object.
in
ColorTrait at line 14
Chart
color(
string $color)
Sets the color for the object carrying this trait.
at line 92
Crosshair
opacity(
float $opacity)
The crosshair opacity, with 0.0 being fully transparent and 1.0 fully opaque.
at line 80
Crosshair
focused(
array $colorConfig)
An object that specifies the crosshair focused color.
at line 113
Crosshair
orientation(
string $orientation)
The crosshair orientation, which can be 'vertical' for vertical hairs only, 'horizontal' for horizontal hairs only, or 'both' for traditional crosshairs.
at line 131
Crosshair
selected(
array $colorConfig)
An object that specifies the crosshair selected color.
at line 143
Crosshair
trigger(
string $trigger)
When to display crosshairs: on 'focus', 'selection', or 'both'.