public class ResetZoomButton extends Configurable<ResetZoomButton>
BaseChart.setResetZoomButton(ResetZoomButton) method.
Note: The setTheme method is not yet implemented, however, the options can still be set using BaseChart.setOption(String, Object)
Although undocumented in Highcharts API, the reset zoom button also appears to accept options similar to the export button, such as 'align.'
Sample usage:
chart.setResetZoomButton(
new ResetZoomButton()
.setRelativeTo("plot")
.setOption("align", "right")
.setOption("/theme/fill", "white")
.setOption("/theme/states/hover/style/color", "white")
);
| Modifier and Type | Class and Description |
|---|---|
static class |
ResetZoomButton.RelativeTo
An enumeration of the supported frames that the reset zoom button's position can be relative to.
|
| Constructor and Description |
|---|
ResetZoomButton() |
| Modifier and Type | Method and Description |
|---|---|
ResetZoomButton |
setPositionX(Number x)
Convenience method for setting the 'x' position of the reset zoom button.
|
ResetZoomButton |
setPositionY(Number y)
Convenience method for setting the 'y' position of the reset zoom button.
|
ResetZoomButton |
setRelativeTo(ResetZoomButton.RelativeTo relativeTo)
Convenience method for setting the frame that the reset zoom button's position is relative to.
|
getOptions, setOptionpublic ResetZoomButton setPositionX(Number x)
chart.setOption("resetZoomButton/position/x", -10);
x - the 'x' position of the resetZoomButton relative to setRelativeTo(RelativeTo)ResetZoomButton instance for convenient method chaining.public ResetZoomButton setPositionY(Number y)
chart.setOption("resetZoomButton/position/y", 10);
y - the 'y' position of the resetZoomButton relative to setRelativeTo(RelativeTo)ResetZoomButton instance for convenient method chaining.public ResetZoomButton setRelativeTo(ResetZoomButton.RelativeTo relativeTo)
resetZoomButton.setOption("relativeTo", "chart");
What frame the button should be placed related to. Can be either "plot" or "chart". Defaults to "plot".relativeTo - The frame that the button's position is relative to.ResetZoomButton instance for convenient method chaining.Copyright © 2015. All Rights Reserved.