AnyChart
API Reference
Still have questions?
Contact support
Top

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.

Params:

Name Type Description
value Element DOM element.

Try it:

dispose

Disposes range selector.
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.

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.

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
value string Value to set.

Returns:

anychart.ui.RangeSelector - Self instance for method chaining.

Try it: