org.moxieapps.gwt.highcharts.client.plotOptions
Class Zone

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

public class Zone
extends Configurable<Zone>

A configurable class representing the general options for a plot's axis zones. These options can be set on a chart's PlotOptions via the PlotOptions.setZones(Zone...) method.

Sample usage:


     plotOptions.setZones(
          new Zone()
              .setDashStyle(PlotLine.DashStyle.SOLID)
              .setValue(3),
          new Zone()
              .setColor("#E0E0E0")
              .setValue(5)
     );
 


Nested Class Summary
static class Zone.Axis
          An enum used to define the Axis on which the zones are applied.
 
Constructor Summary
Zone()
           
 
Method Summary
 Zone setColor(Color color)
          Convenience method for setting the 'color' option of the zone.
 Zone setColor(String color)
          Convenience method for setting the 'color' option of the zone.
 Zone setDashStyle(PlotLine.DashStyle dashStyle)
          Convenience method for setting the 'dashStyle' option of the zone.
 Zone setFillColor(Color fillColor)
          Convenience method for setting the 'fillColor' option of the zone.
 Zone setFillColor(String fillColor)
          Convenience method for setting the 'fillColor' option of the zone.
 Zone setValue(Number value)
          Convenience method for setting the 'value' option of the zone.
 
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

Zone

public Zone()
Method Detail

setColor

public Zone setColor(Color color)
Convenience method for setting the 'color' option of the zone. Equivalent to:

     zone.setOption("color", new Color(0, 0, 0, .5));
 

Note that this method is intended for setting the color to a gradient or color that includes an alpha channel. If you instead just want to set the color to a normal RGB hex value you can use the setColor(String) version instead. Defines the color of the series.

Parameters:
color - Defines the color of the (non-area) series.
Returns:
A link to this Zone instance for convenient method chaining.

setColor

public Zone setColor(String color)
Convenience method for setting the 'color' option of the zone. Equivalent to:

     zone.setOption("color", "#f7a35c");
 

Note that this method is intended for setting the color to a simple RBG hex value. If you instead want to set a color to include an alpha channel or a gradient, use the setColor(Color) version instead. Defines the color of the series.

Parameters:
color - Defines the color of the (non-area) series.
Returns:
A link to this Zone instance for convenient method chaining.

setDashStyle

public Zone setDashStyle(PlotLine.DashStyle dashStyle)
Convenience method for setting the 'dashStyle' option of the zone. Equivalent to:

     zone.setOption("dashStyle", "Solid");
 
A name for the dash style to use for the graph. See PlotLine.DashStyle for available options

Parameters:
dashStyle - The dash style to use for this zone.
Returns:
A link to this Zone instance for convenient method chaining.

setFillColor

public Zone setFillColor(Color fillColor)
Convenience method for setting the 'fillColor' option of the zone. Equivalent to:

     zone.setOption("fillColor", new Color(255, 255, 255, 0));
 

Note that this method is intended for setting the color to a gradient or color that includes an alpha channel. If you instead just want to set the color to a normal RGB hex value you can use the setFillColor(String) version instead.

Parameters:
fillColor - Defines the fill color for the series (in an area type series)
Returns:
A link to this Zone instance for convenient method chaining.

setFillColor

public Zone setFillColor(String fillColor)
Convenience method for setting the 'fillColor' option of the zone. Equivalent to:

     zone.setOption("fillColor", "#f7a35c");
 
Defines the fill color for the series (in area type series)

Note that this method is intended for setting the color to a simple RBG hex value. If you instead want to set a color to include an alpha channel or a gradient, use the setFillColor(Color) version instead.

Parameters:
fillColor - Defines the fill color for the series (in an area type series)
Returns:
A link to this Zone instance for convenient method chaining.

setValue

public Zone setValue(Number value)
Convenience method for setting the 'value' option of the zone. Equivalent to:

     zone.setOption("value", 5);
 
The value up to where the zone extends, if undefined the zones stretches to the last value in the series. Defaults to undefined.

Parameters:
value - The axis value to which this zone will extend.
Returns:
A link to this Zone instance for convenient method chaining.


Copyright © 2015. All Rights Reserved.