Top
You are looking at an outdated 7.12.0 version of this document. Switch to the 7.14.3 version to see the up to date information.

class anychart.ui.RangeSelector Improve this Doc

Range Selector (only for stock chart).

Methods Overview

Specific settings
decorate()Decorates the container for the range selector.
ranges()Buttons settings.
render()Renders the range selector.
target()Set 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

Decorates the container for the range selector.

Params:

Name Type Description
value Element Element to decorate.

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 currentRanges = 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

Set 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 currentText = 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: