public class Zone extends Configurable<Zone>
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)
);
| Modifier and Type | Class and Description |
|---|---|
static class |
Zone.Axis
An enum used to define the Axis on which the zones are applied.
|
| Constructor and Description |
|---|
Zone() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
getOptions, setOptionpublic Zone setColor(Color color)
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.color - Defines the color of the (non-area) series.Zone instance for convenient method chaining.public Zone setColor(String color)
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.color - Defines the color of the (non-area) series.Zone instance for convenient method chaining.public Zone setDashStyle(PlotLine.DashStyle dashStyle)
zone.setOption("dashStyle", "Solid");
A name for the dash style to use for the graph. See PlotLine.DashStyle for
available optionsdashStyle - The dash style to use for this zone.Zone instance for convenient method chaining.public Zone setFillColor(Color fillColor)
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.fillColor - Defines the fill color for the series (in an area type series)Zone instance for convenient method chaining.public Zone setFillColor(String fillColor)
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.fillColor - Defines the fill color for the series (in an area type series)Zone instance for convenient method chaining.public Zone setValue(Number value)
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.value - The axis value to which this zone will extend.Zone instance for convenient method chaining.Copyright © 2015. All Rights Reserved.