class anychart.ui.RangeSelector Improve this Doc
The RangeSelector class contains methods for configuring range selector in a stock chart.
Methods Overview
Specific settings | |
decorate() | Adds a Range Selector to a specified DOM container. |
ranges() | Buttons settings. |
render() | Renders the range selector. |
target() | Sets stock chart for range selector. |
Text settings | |
zoomLabelText() | Label text settings. |
Miscellaneous | |
dispose() | Disposes range selector. |
getElement() | Returns the editable DOM element or null if this field. |
Methods Description
decorate
Adds a Range Selector to a specified DOM container.
Detailed description
Renders a range selector into the element. You should set the chart as the target (through the anychart.ui.RangeSelector#target method).
Params:
Name | Type | Description |
---|---|---|
value | Element | DOM element. |
Try it:
dispose
Disposes range selector.
Removes it from parent layer, nulls links, removes from DOM.
Removes it from parent layer, nulls links, removes from DOM.
Try it:
getElement
Returns the editable DOM element or null if this field.
Returns:
Element - The editable DOM element.Try it:
ranges
Getter for buttons setup.
Returns:
Array.<anychart.ui.RangeSelector.Range> - Array of ranges. See listing
var rangeSelector = anychart.ui.rangeSelector(); var ranges = rangeSelector.ranges();
Setter for buttons setup.
Params:
Name | Type | Description |
---|---|---|
ranges | Array.<anychart.ui.RangeSelector.Range> | Array of ranges. |
Returns:
Array.<anychart.ui.RangeSelector.Range> - Array of ranges.Try it:
render
Renders the range selector.
Detailed description
Creates its own div element in the passed one for the range selector rendering.
When you pass a chart to the render() method, the target is set automatically, but if you pass a DIV Element,
you should set the chart as the target (through the anychart.ui.RangeSelector#target method).
Params:
Name | Type | Description |
---|---|---|
parentElement | anychart.charts.Stock | Element | Element or stock chart to render the range selector into. |
Try it:
target
Sets stock chart for range selector.
Detailed description
Use the target() method if you pass a DIV Element to anychart.ui.RangeSelector#target and anychart.ui.RangePicker#decorate methods.
Params:
Name | Type | Description |
---|---|---|
chart | anychart.charts.Stock | Stock chart to set. |
Try it:
zoomLabelText
Getter for the label text.
Returns:
string - Text for label. See listing
var zoomLabelText = rangeSelector.zoomLabelText();
Setter fot the label text.
Params:
Name | Type | Description |
---|---|---|
text | string | Text to set. |
Returns:
anychart.ui.RangeSelector - Self instance for method chaining.Try it: