|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.moxieapps.gwt.highcharts.client.Configurable<RangeSelector> org.moxieapps.gwt.highcharts.client.RangeSelector
public class RangeSelector
The range selector is a tool for selecting ranges to display within a StockChart
. It provides buttons to select
preconfigured ranges in the chart, like 1 day, 1 week, 1 month, etc. It also provides input boxes where min
and max dates can be manually input.
Basic usage is as follows:
stockChart.setRangeSelector(new RangeSelector()
.setButtons(
new RangeSelector.Button()
.setButtonType(RangeSelector.ButtonType.DAY)
.setCount(1)
.setText("1d"),
new RangeSelector.Button()
.setButtonType(RangeSelector.ButtonType.WEEK)
.setCount(2)
.setText("2w"),
new RangeSelector.Button()
.setButtonType(RangeSelector.ButtonType.MONTH)
.setCount(3)
.setText("2m")
)
.setSelected(1)
.setButtonSpacing(10));
Nested Class Summary | |
---|---|
static class |
RangeSelector.Align
An enumeration of supported range selector horizontal alignment types, which can be passed to methods like setInputPositionAlign(org.moxieapps.gwt.highcharts.client.RangeSelector.Align) method. |
static class |
RangeSelector.Button
Manages the options for configuring the buttons to show within the RangeSelector of
a StockChart . |
static class |
RangeSelector.ButtonType
An enumeration of supported range selector button types, which can be used with the RangeSelector.Button.setType(RangeSelector.ButtonType) method. |
static class |
RangeSelector.VerticalAlign
An enumeration of supported range selector vertical alignment types, which can be passed to methods like Credits.setVerticalAlign(Credits.VerticalAlign) method. |
Constructor Summary | |
---|---|
RangeSelector()
|
Method Summary | |
---|---|
RangeSelector |
setButtons(RangeSelector.Button... buttons)
Configure the buttons to show in the range selector. |
RangeSelector |
setButtonSpacing(Number buttonSpacing)
Set the space in pixels between the buttons in the range selector. |
RangeSelector |
setEnabled(boolean enabled)
Enable or disable the range selector. |
RangeSelector |
setInputDateFormat(String inputDateFormat)
The date format in the input boxes when not selected for editing. |
RangeSelector |
setInputEditDateFormat(String inputEditDateFormat)
The date format in the input boxes when they are selected for editing. |
RangeSelector |
setInputEnabled(boolean inputEnabled)
Enable or disable the date input boxes. |
RangeSelector |
setInputPositionAlign(RangeSelector.Align align)
Convenience method for setting the 'inputPosition' option for the rangeSelector. |
RangeSelector |
setInputPositionVerticalAlign(RangeSelector.VerticalAlign verticalAlign)
Convenience method for setting the 'inputPosition' option for the rangeSelector. |
RangeSelector |
setInputPositionX(Number x)
Convenience method for setting the 'inputPosition' option for the rangeSelector. |
RangeSelector |
setInputPositionY(Number y)
Convenience method for setting the 'inputPosition' option for the rangeSelector. |
RangeSelector |
setInputStyle(Style inputStyle)
CSS for the HTML inputs in the range selector. |
RangeSelector |
setLabelStyle(Style labelStyle)
CSS styles for the labels - the Zoom, From and To texts. |
RangeSelector |
setSelected(Number selected)
Set the index of the button to appear pre-selected. |
Methods inherited from class org.moxieapps.gwt.highcharts.client.Configurable |
---|
getOptions, setOption |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RangeSelector()
Method Detail |
---|
public RangeSelector setButtonSpacing(Number buttonSpacing)
0
.
buttonSpacing
- the pixel space between the buttons
RangeSelector
instance for convenient method chaining.public RangeSelector setButtons(RangeSelector.Button... buttons)
RangeSelector.Button
for button configuration
options.
buttons
- the buttons to display in the range selector.
RangeSelector
instance for convenient method chaining.public RangeSelector setEnabled(boolean enabled)
true
.
enabled
- true to enable the range selector, false to disable.
RangeSelector
instance for convenient method chaining.public RangeSelector setInputDateFormat(String inputDateFormat)
%b %e, %Y
".
inputDateFormat
- the date format in the input boxes when not selected for editing.
RangeSelector
instance for convenient method chaining.public RangeSelector setInputEditDateFormat(String inputEditDateFormat)
Date.parse
. Defaults to "%Y-%m-%d
".
inputEditDateFormat
- The date format in the input boxes when they are selected for editing.
RangeSelector
instance for convenient method chaining.public RangeSelector setInputEnabled(boolean inputEnabled)
inputEnabled
- true to enable the date input boxes, false to disable.
RangeSelector
instance for convenient method chaining.public RangeSelector setInputPositionAlign(RangeSelector.Align align)
stockChart.setOption("/inputPosition/VerticalAlign", center);
Sample usage:
stockChart.setRangeSelector(
new RangeSelector()
.setInputPositionAlign(Align.LEFT)
);
Can be one of either 'left, 'center', or right'
align
- The horizontal alignment for the input box.
RangeSelector
instance for convenient method chaining.public RangeSelector setInputPositionVerticalAlign(RangeSelector.VerticalAlign verticalAlign)
stockChart.setOption("/inputPosition/verticalAlign", top);
Sample usage:
stockChart.setRangeSelector(
new RangeSelector()
.setInputPositionAlign(VerticalAlign.TOP)
);
Can be one of either 'top, 'middle', or 'bottom'
verticalAlign
- The vertical position for the input box.
RangeSelector
instance for convenient method chaining.public RangeSelector setInputPositionX(Number x)
stockChart.setOption("/inputPosition/x", 15);
Sample usage:
stockChart.setRangeSelector(
new RangeSelector()
.setInputPositionX(15)
);
x
- the x offset for the input box.
RangeSelector
instance for convenient method chaining.public RangeSelector setInputPositionY(Number y)
stockChart.setOption("/inputPosition/y", 10);
Sample usage:
stockChart.setRangeSelector(
new RangeSelector()
.setInputPositionY(10)
);
y
- The y offset for the input box.
RangeSelector
instance for convenient method chaining.public RangeSelector setInputStyle(Style inputStyle)
inputStyle
- The CSS style object containing the style for the range selector inputs.
RangeSelector
instance for convenient method chaining.public RangeSelector setLabelStyle(Style labelStyle)
labelStyle
- The CSS style object containing the style for the range selector label.
RangeSelector
instance for convenient method chaining.public RangeSelector setSelected(Number selected)
null
.
selected
- the index of the button to appear pre-selected.
RangeSelector
instance for convenient method chaining.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |