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.RangePicker Improve this Doc

Range Picker (only for stock chart).

Methods Overview

Specific settings
decorate()Decorates the container for the range picker.
format()Date time format.
render()Renders the range picker.
target()Sets stock chart for range picker.
'From' text settings
fromLabelText()'From' label text settings.
'To' text settings
toLabelText()'To' label text settings.
Miscellaneous
dispose()Disposes range picker.
getElement()Returns the editable DOM element or null if this field.

Methods Description

decorate

Decorates the container for the range picker.

Params:

NameTypeDescription
valueElementElement to decorate.

dispose

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

format

Getter for the input and output date time format.

Returns:

string - Output date time format.
See listing
var rangePicker = anychart.ui.rangePicker();
var dateTimeFormat = rangePicker.format();
Setter for the input and output date time format.

Params:

NameTypeDescription
formatstringDate time format

Returns:

string - Date time format.

fromLabelText

Getter for the text for 'from'-label.

Returns:

string - Text for 'from'-label.
See listing
var currentText = rangePicker.fromLabelText();
Setter for the text for 'from'-label.

Params:

NameTypeDescription
valuestringValue to set.

Returns:

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

getElement

Returns the editable DOM element or null if this field.

Returns:

Element - The editable DOM element.

render

Renders the range picker.

Params:

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

target

Sets stock chart for range picker.

Params:

NameTypeDescription
chartanychart.charts.StockStock chart to set.

toLabelText

Getter for the text for 'to'-label.

Returns:

string - The text for 'to'-label.
See listing
var currentText = rangePicker.toLabelText();
Setter for the text for 'to'-label.

Params:

NameTypeDescription
valuestringValue to set.

Returns:

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