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:

NameTypeDescription
valueElementDOM element.

dispose

Disposes range selector.
Removes it from parent layer, nulls links, removes from DOM.

getElement

Returns the editable DOM element or null if this field.

Returns:

Element - The editable DOM element.

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:

NameTypeDescription
rangesArray.<anychart.ui.RangeSelector.Range>Array of ranges.

Returns:

Array.<anychart.ui.RangeSelector.Range> - Array of ranges.

render

Renders the range selector.

Params:

NameTypeDescription
parentElementanychart.charts.Stock | ElementElement or stock chart to render the range selector into.

target

Sets stock chart for range selector.

Params:

NameTypeDescription
chartanychart.charts.StockStock chart to set.

zoomLabelText

Getter for the label text.

Returns:

string - Text for label.
See listing
var zoomLabelText = rangeSelector.zoomLabelText();
Setter fot the label text.

Params:

NameTypeDescription
textstringText to set.

Returns:

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