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.
Detailed description
Renders a range picker into the element. You should set the chart as the target (through the anychart.ui.RangePicker#target method).
Params:
Name | Type | Description |
---|---|---|
value | Element | Element to decorate. |
Try it:
dispose
Disposes range picker.
Removes it from parent layer, nulls links, removes from DOM.
Try it:
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:
Name | Type | Description |
---|---|---|
format | string | Date time format |
Returns:
string - Date time format.Try it:
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:
Name | Type | Description |
---|---|---|
value | string | Value to set. |
Returns:
anychart.ui.RangePicker - Self instance for method chaining.Try it:
getElement
Returns the editable DOM element or null if this field.
Returns:
Element - The editable DOM element.Try it:
render
Renders the range picker.
Detailed description
Creates its own DIV Element in the passed one for the range picker rendering.
When you pass a chart to the render() method, the target is set automatically, but if you pass a DIV Element,
you should set the chart as the target (through the anychart.ui.RangePicker#target method).
Params:
Name | Type | Description |
---|---|---|
parentElement | anychart.charts.Stock | Element | Element or stock chart to render the range picker into. |
Try it:
target
Sets stock chart for range picker.
Detailed description
Use the target() method if you pass a DIV Element to anychart.ui.RangePicker#target and anychart.ui.RangePicker#decorate methods.
Params:
Name | Type | Description |
---|---|---|
chart | anychart.charts.Stock | Stock chart to set. |
Try it:
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:
Name | Type | Description |
---|---|---|
value | string | Value to set. |
Returns:
anychart.ui.RangePicker - Self instance for method chaining.Try it: