Class RangeSelector
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddButton(RangeSelectorButton button) Adds button to the buttons arrayvoidremoveButton(RangeSelectorButton button) Removes first occurrence of button in buttons arrayvoidsetAllButtonsEnabled(Boolean allButtonsEnabled) Whether to enable all buttons from the start.voidsetButtonPosition(ButtonPosition buttonPosition) A fixed pixel position for the buttons.voidsetButtons(RangeSelectorButton... buttons) An array of configuration objects for the buttons.voidsetButtonSpacing(Number buttonSpacing) The space in pixels between the buttons in the range selector.voidsetButtonTheme(ButtonTheme buttonTheme) A collection of attributes for the buttons.voidsetEnabled(Boolean enabled) Enable or disable the range selector.voidThe height of the range selector, used to reserve space for buttons and input.voidsetInputBoxBorderColor(Color inputBoxBorderColor) The border color of the date input boxes.voidsetInputBoxHeight(Number inputBoxHeight) The pixel height of the date input boxes.voidsetInputBoxWidth(Number inputBoxWidth) The pixel width of the date input boxes.voidsetInputDateFormat(String inputDateFormat) The date format in the input boxes when not selected for editing.voidsetInputDateParser(String _fn_inputDateParser) voidsetInputEditDateFormat(String inputEditDateFormat) The date format in the input boxes when they are selected for editing.voidsetInputEnabled(Boolean inputEnabled) Enable or disable the date input boxes.voidsetInputPosition(ButtonPosition inputPosition) Positioning for the input boxes.voidsetInputStyle(Style inputStyle) CSS for the HTML inputs in the range selector.voidsetLabelStyle(Style labelStyle) CSS styles for the labels - the Zoom, From and To texts.voidsetSelected(Number selected) The index of the button to appear pre-selected.
-
Constructor Details
-
RangeSelector
public RangeSelector() -
RangeSelector
-
-
Method Details
-
getAllButtonsEnabled
- See Also:
-
setAllButtonsEnabled
Whether to enable all buttons from the start. By default buttons are only enabled if the corresponding time range exists on the X axis, but enabling all buttons allows for dynamically loading different time ranges.Defaults to: false
-
getButtonPosition
- See Also:
-
setButtonPosition
A fixed pixel position for the buttons. Supports two properties,xandy. -
getButtonSpacing
- See Also:
-
setButtonSpacing
The space in pixels between the buttons in the range selector.Defaults to: 0
-
getButtonTheme
- See Also:
-
setButtonTheme
A collection of attributes for the buttons. The object takes SVG attributes like
fill,stroke,stroke-width, as well asstyle, a collection of CSS properties for the text.The object can also be extended with states, so you can set presentational options for
hover,selectordisabledbutton states.CSS styles for the text label.
In styled mode, the buttons are styled by the
.highcharts-range-selector-buttons .highcharts-buttonrule with its different states. -
getButtons
- See Also:
-
setButtons
An array of configuration objects for the buttons.
Defaults tobuttons: [{ type: 'month', count: 1, text: '1m' }, { type: 'month', count: 3, text: '3m' }, { type: 'month', count: 6, text: '6m' }, { type: 'ytd', text: 'YTD' }, { type: 'year', count: 1, text: '1y' }, { type: 'all', text: 'All' }] -
addButton
Adds button to the buttons array- Parameters:
button- to add- See Also:
-
removeButton
Removes first occurrence of button in buttons array- Parameters:
button- to remove- See Also:
-
getEnabled
- See Also:
-
setEnabled
Enable or disable the range selector.Defaults to: true
-
getHeight
- See Also:
-
setHeight
The height of the range selector, used to reserve space for buttons and input.Defaults to: 35
-
getInputBoxBorderColor
- See Also:
-
setInputBoxBorderColor
The border color of the date input boxes.Defaults to: #cccccc
-
getInputBoxHeight
- See Also:
-
setInputBoxHeight
The pixel height of the date input boxes.Defaults to: 17
-
getInputBoxWidth
- See Also:
-
setInputBoxWidth
The pixel width of the date input boxes.Defaults to: 90
-
getInputDateFormat
- See Also:
-
setInputDateFormat
The date format in the input boxes when not selected for editing. Defaults to%b %e, %Y.Defaults to: %b %e %Y,
-
getInputDateParser
-
setInputDateParser
-
getInputEditDateFormat
- See Also:
-
setInputEditDateFormat
The date format in the input boxes when they are selected for editing. This must be a format that is recognized by JavaScript Date.parse.Defaults to: %Y-%m-%d
-
getInputEnabled
- See Also:
-
setInputEnabled
Enable or disable the date input boxes. Defaults to enabled when there is enough space, disabled if not (typically mobile). -
getInputPosition
- See Also:
-
setInputPosition
Positioning for the input boxes. Allowed properties arealign,verticalAlign,xandy.Defaults to: { align: "right" }
-
getInputStyle
- See Also:
-
setInputStyle
CSS for the HTML inputs in the range selector.
In styled mode, the inputs are styled by the
.highcharts-range-input textrule in SVG mode, andinput.highcharts-range-selectorwhen active. -
getLabelStyle
- See Also:
-
setLabelStyle
CSS styles for the labels - the Zoom, From and To texts.
In styled mode, the labels are styled by the
.highcharts-range-labelclass. -
getSelected
- See Also:
-
setSelected
The index of the button to appear pre-selected.Defaults to: undefined
-