org.moxieapps.gwt.highcharts.client
Class ResetZoomButton

java.lang.Object
  extended by org.moxieapps.gwt.highcharts.client.Configurable<ResetZoomButton>
      extended by org.moxieapps.gwt.highcharts.client.ResetZoomButton

public class ResetZoomButton
extends Configurable<ResetZoomButton>

A configurable class that will allow you to control the reset zoom button options of the chart. This configuration object holds general options for the position and theme of the button. An instance of this class can be constructed and then set on the pane via the 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")
     );
 

Since:
1.6.0
Author:
cskowron@moxiegroup.com (Cory Skowronek)

Nested Class Summary
static class ResetZoomButton.RelativeTo
          An enumeration of the supported frames that the reset zoom button's position can be relative to.
 
Constructor Summary
ResetZoomButton()
           
 
Method Summary
 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.
 
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

ResetZoomButton

public ResetZoomButton()
Method Detail

setPositionX

public ResetZoomButton setPositionX(Number x)
Convenience method for setting the 'x' position of the reset zoom button. Equivalent to:

     chart.setOption("resetZoomButton/position/x", -10);
 

Parameters:
x - the 'x' position of the resetZoomButton relative to setRelativeTo(RelativeTo)
Returns:
A reference to this ResetZoomButton instance for convenient method chaining.

setPositionY

public ResetZoomButton setPositionY(Number y)
Convenience method for setting the 'y' position of the reset zoom button. Equivalent to:

     chart.setOption("resetZoomButton/position/y", 10);
 

Parameters:
y - the 'y' position of the resetZoomButton relative to setRelativeTo(RelativeTo)
Returns:
A reference to this ResetZoomButton instance for convenient method chaining.

setRelativeTo

public ResetZoomButton setRelativeTo(ResetZoomButton.RelativeTo relativeTo)
Convenience method for setting the frame that the reset zoom button's position is relative to. Equivalent to:

     resetZoomButton.setOption("relativeTo", "chart");
 
What frame the button should be placed related to. Can be either "plot" or "chart". Defaults to "plot".

Parameters:
relativeTo - The frame that the button's position is relative to.
Returns:
A reference to this ResetZoomButton instance for convenient method chaining.


Copyright © 2015. All Rights Reserved.