AnyChart
API Reference
Still have questions?
Contact support
Top
You are looking at an outdated v7 version of this document. Switch to the v8 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:

NameTypeDescription
valueElementElement to decorate.

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

Set 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 currentText = rangeSelector.zoomLabelText();
Setter fot the label text.

Params:

NameTypeDescription
valuestringValue to set.

Returns:

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