new module:ct-chart /highchart /Range Utility()
A static utility class for dealing with HighChart's range selector.
This is a static class that never needs to be instantiated.
Methods
(static) apply Options(chart, options)
Applies the range options to the HighChart chart instance.
Parameters:
Name | Type | Description |
---|---|---|
chart |
Object | A HighChart chart instance. |
options |
Map | A map with selected options. See |
(static) get Options(chart) → {Map}
Returns a options map with information about which range selector button is selected or what are the extremes
currently set in the navigator. The result of this method can be passed into
module:ct-chart/highchart/RangeUtility.applyOptions
to re-apply the options (after deserialisation for
example).
The returned map will always have the following structure:
{
selectedRangeSelector: null,
extremes: {
relativeMin: null,
relativeMax: null
}
}
Note that if selectedRangeSelector
is not null then the extremes values will be null, and the other
way around. They can however both be null.
Parameters:
Name | Type | Description |
---|---|---|
chart |
Object | A HighChart chart instance. |
Returns:
A map with the selected options.
- Type
- Map