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

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

public class Marker
extends Configurable<Marker>

Controls configuration options for the markers within a series. Can be set as a plot option on a series via the PlotOptions.setMarker(Marker) method. Example usage:

   chart.setSeriesPlotOptions(new SeriesPlotOptions()
      .setMarker(
         new Marker()
            .setEnabled(true)
            .setFillColor("#CC0000")
            .setRadius(4)
      )
   );
 

Since:
1.0.0
Author:
squinn@moxiegroup.com (Shawn Quinn)

Nested Class Summary
static class Marker.Symbol
          An enumeration of supported marker symbol types, which can be passed to methods like setSymbol(Marker.Symbol) method.
 
Constructor Summary
Marker()
           
 
Method Summary
 Marker setEnabled(boolean enabled)
          Convenience method for setting the 'enabled' option for the markers.
 Marker setFillColor(Color fillColor)
          Convenience method for setting the 'fillColor' option of the markers, allowing for colors with opacity or gradients.
 Marker setFillColor(String fillColor)
          Convenience method for setting the 'fillColor' option of the markers to a RGB hex value.
 Marker setHoverState(Marker hoverState)
          Set the configuration options for the hovered point marker.
 Marker setLineColor(Color lineColor)
          Convenience method for setting the 'lineColor' option of the markers, allowing for colors with opacity or gradients.
 Marker setLineColor(String lineColor)
          Convenience method for setting the 'lineColor' option of the markers to a RGB hex value.
 Marker setLineWidth(Number lineWidth)
          Convenience method for setting the 'lineWidth' option for the markers.
 Marker setRadius(Number radius)
          Convenience method for setting the 'radius' option for the markers.
 Marker setSelectState(Marker selectState)
          Set the configuration options for the selected point marker.
 Marker setSymbol(Marker.Symbol symbol)
          Convenience method for setting the 'symbol' option for the markers.
 Marker setSymbol(String symbolURL)
          Convenience method for setting the 'symbol' option for markers to a URL.
 
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

Marker

public Marker()
Method Detail

setEnabled

public Marker setEnabled(boolean enabled)
Convenience method for setting the 'enabled' option for the markers. Equivalent to:

     marker.setOption("enabled", true);
 
Enable or disable the point marker. Defaults to true.

Parameters:
enabled - Enable or disable the point marker.
Returns:
A reference to this Marker instance for convenient method chaining.

setFillColor

public Marker setFillColor(String fillColor)
Convenience method for setting the 'fillColor' option of the markers to a RGB hex value. Equivalent to:

     marker.setOption("fillColor", "#CCCCCC");
 
The fill color of the point marker. When null, the series' or point's color is used. Defaults to null.

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 'fillColor' option of the markers.
Returns:
A reference to this Marker instance for convenient method chaining.

setFillColor

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

     marker.setOption("fillColor", new Color()
        .setLinearGradient(0.0, 0.0, 1.0, 1.0)
        .addStop(new Color(255, 255, 255))
        .addStop(new Color(200, 200, 255))
     );
 
The fill color of the point marker. When null, the series' or point's color is used. Defaults to null.

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 'fillColor' option of the markers.
Returns:
A reference to this Marker instance for convenient method chaining.

setLineColor

public Marker setLineColor(String lineColor)
Convenience method for setting the 'lineColor' option of the markers to a RGB hex value. Equivalent to:

     marker.setOption("lineColor", "#CCCCCC");
 
The color of the point marker's outline. When null, the series' or point's color is used. Defaults to "#FFFFFF".

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 of the markers.
Returns:
A reference to this Marker instance for convenient method chaining.

setLineColor

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

     marker.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 point marker's outline. When null, the series' or point's color is used. Defaults to "#FFFFFF".

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 'lineColor' option of the markers.
Returns:
A reference to this Marker instance for convenient method chaining.

setLineWidth

public Marker setLineWidth(Number lineWidth)
Convenience method for setting the 'lineWidth' option for the markers. Equivalent to:

     marker.setOption("lineWidth", 4);
 
The width of the point marker's outline. Defaults to 0.

Parameters:
lineWidth - The width of the point marker's outline.
Returns:
A reference to this Marker instance for convenient method chaining.

setRadius

public Marker setRadius(Number radius)
Convenience method for setting the 'radius' option for the markers. Equivalent to:

     marker.setOption("radius", 4);
 
The radius of the point marker. Defaults to 0.

Parameters:
radius - The radius of the point marker.
Returns:
A reference to this Marker instance for convenient method chaining.

setHoverState

public Marker setHoverState(Marker hoverState)
Set the configuration options for the hovered point marker. Members are inherited from the default line configuration, but single members can be overridden. Equivalent to:

     marker.setOption("/states/hover/enabled", true);
     marker.setOption("/states/hover/radius", 8);
     ...
 

Parameters:
hoverState - The configuration options to use for the markers on mouse hover.
Returns:
A reference to this Marker instance for convenient method chaining.

setSelectState

public Marker setSelectState(Marker selectState)
Set the configuration options for the selected point marker. Members are inherited from the default line configuration, but single members can be overridden. Equivalent to:

     marker.setOption("/states/select/enabled", true);
     marker.setOption("/states/select/radius", 8);
     ...
 

Parameters:
selectState - The configuration options to use for the markers when selected.
Returns:
A reference to this Marker instance for convenient method chaining.

setSymbol

public Marker setSymbol(Marker.Symbol symbol)
Convenience method for setting the 'symbol' option for the markers. Equivalent to:

     marker.setOption("symbol", Marker.Symbol.DIAMOND);
 
A predefined shape or symbol for the marker. When null, the symbol is pulled from the default BaseChart.setSymbols(org.moxieapps.gwt.highcharts.client.plotOptions.Marker.Symbol[]) options. Defaults to null.

Note that custom marker images are also supported by simply setting the "symbol" option to a URL reference. E.g.


     marker.setOption("symbol", "url(/serverpath/image.png)");
 

Parameters:
symbol - The shape or symbol for the marker.
Returns:
A reference to this Marker instance for convenient method chaining.

setSymbol

public Marker setSymbol(String symbolURL)
Convenience method for setting the 'symbol' option for markers to a URL. Equivalent to:

     marker.setOption("symbol", "url('http://highcharts.com/demo/gfx/sun.png')");
 
Sets the marker to use a custom symbol from a url. Note that only the url itself is needed to be passed as a parameter. Sample usage:

     chart.addSeries(
         chart.createSeries()
              .addPoint(
                  new Point(216.4)
                      .setMarker(
                          new Marker()
                              .setSymbol("http://highcharts.com/demo/gfx/sun.png")
     );
 

Parameters:
symbolURL - the url of the symbol to use for the marker.
Returns:
A reference to this Marker instance for convenient method chaining.
Since:
1.6.0


Copyright © 2015. All Rights Reserved.