class anychart.ui.RangePicker Improve this Doc
The RangePicker class contains methods for configuring range picker.
Methods Overview
Specific settings | |
decorate() | Adds a Range Picker to a specified DOM container. |
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
Adds a Range Picker to a specified DOM container.
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 | DOM element. |
Try it:
dispose
Disposes range picker.
Removes it from parent layer, nulls links, removes from DOM.
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 format = 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 fromLabelText = rangePicker.fromLabelText();
Setter for the text for 'from'-label.
Params:
Name | Type | Description |
---|---|---|
text | string | Label text 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).
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 toLabelText = rangePicker.toLabelText();
Setter for the text for 'to'-label.
Params:
Name | Type | Description |
---|---|---|
text | string | Label text to set. |
Returns:
anychart.ui.RangePicker - Self instance for method chaining.Try it: