public class RangeSelector extends AbstractConfigurationObject
| Constructor and Description |
|---|
RangeSelector() |
RangeSelector(Boolean enabled) |
| Modifier and Type | Method and Description |
|---|---|
void |
addButton(RangeSelectorButton button)
Adds button to the buttons array
|
Boolean |
getAllButtonsEnabled() |
ButtonPosition |
getButtonPosition() |
RangeSelectorButton[] |
getButtons() |
Number |
getButtonSpacing() |
ButtonTheme |
getButtonTheme() |
Boolean |
getEnabled() |
Number |
getHeight() |
Color |
getInputBoxBorderColor() |
Number |
getInputBoxHeight() |
Number |
getInputBoxWidth() |
String |
getInputDateFormat() |
String |
getInputDateParser() |
String |
getInputEditDateFormat() |
Boolean |
getInputEnabled() |
ButtonPosition |
getInputPosition() |
Style |
getInputStyle() |
Style |
getLabelStyle() |
Number |
getSelected() |
void |
removeButton(RangeSelectorButton button)
Removes first occurrence of button in buttons array
|
void |
setAllButtonsEnabled(Boolean allButtonsEnabled)
Whether to enable all buttons from the start.
|
void |
setButtonPosition(ButtonPosition buttonPosition)
A fixed pixel position for the buttons.
|
void |
setButtons(RangeSelectorButton... buttons)
An array of configuration objects for the buttons.
|
void |
setButtonSpacing(Number buttonSpacing)
The space in pixels between the buttons in the range selector.
|
void |
setButtonTheme(ButtonTheme buttonTheme)
A collection of attributes for the buttons.
|
void |
setEnabled(Boolean enabled)
Enable or disable the range selector.
|
void |
setHeight(Number height)
The height of the range selector, used to reserve space for buttons and
input.
|
void |
setInputBoxBorderColor(Color inputBoxBorderColor)
The border color of the date input boxes.
|
void |
setInputBoxHeight(Number inputBoxHeight)
The pixel height of the date input boxes.
|
void |
setInputBoxWidth(Number inputBoxWidth)
The pixel width of the date input boxes.
|
void |
setInputDateFormat(String inputDateFormat)
The date format in the input boxes when not selected for editing.
|
void |
setInputDateParser(String _fn_inputDateParser) |
void |
setInputEditDateFormat(String inputEditDateFormat)
The date format in the input boxes when they are selected for editing.
|
void |
setInputEnabled(Boolean inputEnabled)
Enable or disable the date input boxes.
|
void |
setInputPosition(ButtonPosition inputPosition)
Positioning for the input boxes.
|
void |
setInputStyle(Style inputStyle)
CSS for the HTML inputs in the range selector.
|
void |
setLabelStyle(Style labelStyle)
CSS styles for the labels - the Zoom, From and To texts.
|
void |
setSelected(Number selected)
The index of the button to appear pre-selected.
|
public RangeSelector()
public RangeSelector(Boolean enabled)
public Boolean getAllButtonsEnabled()
setAllButtonsEnabled(Boolean)public void setAllButtonsEnabled(Boolean allButtonsEnabled)
Defaults to: false
public ButtonPosition getButtonPosition()
setButtonPosition(ButtonPosition)public void setButtonPosition(ButtonPosition buttonPosition)
x and y.public Number getButtonSpacing()
setButtonSpacing(Number)public void setButtonSpacing(Number buttonSpacing)
Defaults to: 0
public ButtonTheme getButtonTheme()
setButtonTheme(ButtonTheme)public void setButtonTheme(ButtonTheme buttonTheme)
A collection of attributes for the buttons. The object takes SVG
attributes like fill, stroke,
stroke-width, as well as style, a collection of
CSS properties for the text.
The object can also be extended with states, so you can set
presentational options for hover, select or
disabled button states.
CSS styles for the text label.
In styled mode, the buttons are styled by the
.highcharts-range-selector-buttons .highcharts-button rule
with its different states.
public RangeSelectorButton[] getButtons()
setButtons(RangeSelectorButton...)public void setButtons(RangeSelectorButton... buttons)
An array of configuration objects for the buttons.
Defaults to
buttons: [{
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'
}]
public void addButton(RangeSelectorButton button)
button - to addsetButtons(RangeSelectorButton...)public void removeButton(RangeSelectorButton button)
button - to removesetButtons(RangeSelectorButton...)public Boolean getEnabled()
setEnabled(Boolean)public void setEnabled(Boolean enabled)
Defaults to: true
public Number getHeight()
setHeight(Number)public void setHeight(Number height)
Defaults to: 35
public Color getInputBoxBorderColor()
setInputBoxBorderColor(Color)public void setInputBoxBorderColor(Color inputBoxBorderColor)
Defaults to: #cccccc
public Number getInputBoxHeight()
setInputBoxHeight(Number)public void setInputBoxHeight(Number inputBoxHeight)
Defaults to: 17
public Number getInputBoxWidth()
setInputBoxWidth(Number)public void setInputBoxWidth(Number inputBoxWidth)
Defaults to: 90
public String getInputDateFormat()
setInputDateFormat(String)public void setInputDateFormat(String inputDateFormat)
%b %e, %Y.
Defaults to: %b %e %Y,
public String getInputDateParser()
public void setInputDateParser(String _fn_inputDateParser)
public String getInputEditDateFormat()
setInputEditDateFormat(String)public void setInputEditDateFormat(String inputEditDateFormat)
Defaults to: %Y-%m-%d
public Boolean getInputEnabled()
setInputEnabled(Boolean)public void setInputEnabled(Boolean inputEnabled)
public ButtonPosition getInputPosition()
setInputPosition(ButtonPosition)public void setInputPosition(ButtonPosition inputPosition)
align, verticalAlign, x and
y.
Defaults to: { align: "right" }
public Style getInputStyle()
setInputStyle(Style)public void setInputStyle(Style inputStyle)
CSS for the HTML inputs in the range selector.
In styled mode, the inputs are styled by the
.highcharts-range-input text rule in SVG mode, and
input.highcharts-range-selector when active.
public Style getLabelStyle()
setLabelStyle(Style)public void setLabelStyle(Style labelStyle)
CSS styles for the labels - the Zoom, From and To texts.
In styled mode, the labels are styled by the
.highcharts-range-label class.
public Number getSelected()
setSelected(Number)public void setSelected(Number selected)
Defaults to: undefined
Copyright © 2024. All rights reserved.