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

java.lang.Object
  extended by org.moxieapps.gwt.highcharts.client.Configurable<T>
      extended by org.moxieapps.gwt.highcharts.client.plotOptions.PlotOptions<FlagPlotOptions>
          extended by org.moxieapps.gwt.highcharts.client.plotOptions.FlagPlotOptions

public class FlagPlotOptions
extends PlotOptions<FlagPlotOptions>

Represents the options for the Flags present on the chart. The plot options for this class are to be instantiated into a Series. Example usage:


     chart.addSeries(
          chart.createSeries()
              .setType(Series.FLAGS)
              .addPoint(t(2011), 5, 10)
              .setPlotOptions(
                  new FlagPlotOptions()
                      .setOnSeries("data")
              )
      );
 

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

Nested Class Summary
static class FlagPlotOptions.Shape
          An enumeration representing the shape of the flag.
 
Nested classes/interfaces inherited from class org.moxieapps.gwt.highcharts.client.plotOptions.PlotOptions
PlotOptions.Cursor, PlotOptions.PointPlacement, PlotOptions.Stacking
 
Constructor Summary
FlagPlotOptions()
           
 
Method Summary
 FlagPlotOptions setFillColor(Color fillColor)
          Convenience method for setting the 'fillColor' option of the flag, allowing for colors with opacity or gradients.
 FlagPlotOptions setFillColor(String fillColor)
          Convenience method for setting the 'fillColor' option of the flag to an RGB hex value.
 FlagPlotOptions setLineColor(Color lineColor)
          Convenience method for setting the 'lineColor' option of the flag, allowing for colors with opacity or gradients.
 FlagPlotOptions setLineColor(String lineColor)
          Convenience method for setting the 'lineColor' option of the flag to an RGB hex value.
 FlagPlotOptions setOnSeries(String onSeries)
          Convenience method for setting the 'onSeries' option of the flag.
 FlagPlotOptions setShape(FlagPlotOptions.Shape shape)
          Convenience method for setting the 'shape' option of the flag.
 FlagPlotOptions setStyle(Style style)
          Convenience method for setting the 'style' options of the flag.
 FlagPlotOptions setWidth(Number width)
          Convenience method for setting the 'width' option of the flag.
 
Methods inherited from class org.moxieapps.gwt.highcharts.client.plotOptions.PlotOptions
getDataLabels, setAllowPointSelect, setAnimation, setAnimation, setBaseDataLabels, setColor, setColor, setCropThreshold, setCursor, setDashStyle, setDataGrouping, setDataLabels, setEnableMouseTracking, setHoverStateEnabled, setHoverStateLineWidth, setHoverStateMarker, setId, setLegendIndex, setLineWidth, setLinkedTo, setLinkedTo, setMarker, setNegativeColor, setNegativeColor, setPointInterval, setPointPlacement, setPointStart, setSelected, setShadow, setShowCheckbox, setShowInLegend, setStacking, setStickyTracking, setThreshold, setTurboThreshold, setVisible, setZIndex, setZoneAxis, setZones
 
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

FlagPlotOptions

public FlagPlotOptions()
Method Detail

setFillColor

public FlagPlotOptions setFillColor(String fillColor)
Convenience method for setting the 'fillColor' option of the flag to an RGB hex value. Equivalent to:

     series.setOption("lineColor", "#CCCCCC");
 
The RGB color of the flag. Defaults to "#4572A7".

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 - The value to set as the 'lineColor' option on the chart.
Returns:
A reference to this FlagPlotOptions instance for convenient method chaining.
Since:
1.6.0
See Also:
setFillColor(Color)

setFillColor

public FlagPlotOptions setFillColor(Color fillColor)
Convenience method for setting the 'fillColor' option of the flag, allowing for colors with opacity or gradients. Equivalent to:

     series.setOption("lineColor", new Color()
        .setLinearGradient(0.0, 0.0, 1.0, 1.0)
        .addStop(new Color(255, 255, 255))
        .addStop(new Color(200, 200, 255))
     );
 
The color of the flag. Defaults to "#4572A7".

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 - The color gradient or color with an alpha channel to set as the 'borderColor' option on the chart.
Returns:
A reference to this FlagPlotOptions instance for convenient method chaining.

setLineColor

public FlagPlotOptions setLineColor(String lineColor)
Convenience method for setting the 'lineColor' option of the flag to an RGB hex value. Equivalent to:

     series.setOption("lineColor", "#CCCCCC");
 
The RGB color of the outer chart border. The border is painted using vector graphic techniques to allow rounded corners. Defaults to "#4572A7".

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 setLineColor(Color) version instead.

Parameters:
lineColor - The value to set as the 'lineColor' option on the chart.
Returns:
A reference to this FlagPlotOptions instance for convenient method chaining.
Since:
1.6.0
See Also:
setLineColor(Color)

setLineColor

public FlagPlotOptions setLineColor(Color lineColor)
Convenience method for setting the 'lineColor' option of the flag, allowing for colors with opacity or gradients. Equivalent to:

     series.setOption("lineColor", new Color()
        .setLinearGradient(0.0, 0.0, 1.0, 1.0)
        .addStop(new Color(255, 255, 255))
        .addStop(new Color(200, 200, 255))
     );
 
The color of the flag's line. Defaults to "#4572A7".

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 setLineColor(String) version instead.

Parameters:
lineColor - The color gradient or color with an alpha channel to set as the 'borderColor' option on the chart.
Returns:
A reference to this FlagPlotOptions instance for convenient method chaining.

setOnSeries

public FlagPlotOptions setOnSeries(String onSeries)
Convenience method for setting the 'onSeries' option of the flag. Equivalent to:

     series.setOption("onSeries", "seriesName")
 
Attaches flags to the given series. If no id is given, the flags are drawn on the x axis. Defaults to undefined. Defaults to undefined.

Parameters:
onSeries - The id of the series that the flags should be drawn on
Returns:
A reference to this FlagPlotOptions instance for convenient method chaining.

setShape

public FlagPlotOptions setShape(FlagPlotOptions.Shape shape)
Convenience method for setting the 'shape' option of the flag. Equivalent to:

     series.setOption("shape", "flag");
 
Sets the shape of the flag. Can be one of "circlepin", "squarepin", or "flag". Defaults to "flag".

Parameters:
shape - The shape of the marker.
Returns:
A reference to this FlagPlotOptions instance for convenient method chaining.

setStyle

public FlagPlotOptions setStyle(Style style)
Convenience method for setting the 'style' options of the flag. Equivalent to:

     series.setOption("/style/fontWeight", "bold");
     series.setOption("/style/fontFamily", "serif");
     etc.
 
CSS styles for the flag. When titles are rotated they are rendered using vector graphic techniques and not all styles are applicable. Most noteworthy, a bug in IE8 renders all rotated strings bold and italic. Defaults to:

Parameters:
style - CSS styles for the axis title.
Returns:
A reference to this FlagPlotOptions instance for convenient method chaining.

setWidth

public FlagPlotOptions setWidth(Number width)
Convenience method for setting the 'width' option of the flag. Equivalent to:

     series.setOption("width", 10);
 
Manually sets the width of the flag.

Parameters:
width - The width of the flag.
Returns:
A reference to this FlagPlotOptions instance for convenient method chaining.


Copyright © 2015. All Rights Reserved.