|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.moxieapps.gwt.highcharts.client.Configurable<Marker> org.moxieapps.gwt.highcharts.client.plotOptions.Marker
public class 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)
)
);
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 |
---|
public Marker()
Method Detail |
---|
public Marker setEnabled(boolean enabled)
marker.setOption("enabled", true);
Enable or disable the point marker. Defaults to true.
enabled
- Enable or disable the point marker.
Marker
instance for convenient method chaining.public Marker setFillColor(String fillColor)
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.
fillColor
- The value to set as the 'fillColor' option of the markers.
Marker
instance for convenient method chaining.public Marker setFillColor(Color fillColor)
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.
fillColor
- The color gradient or color with an alpha channel to set as the 'fillColor' option of the markers.
Marker
instance for convenient method chaining.public Marker setLineColor(String lineColor)
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.
lineColor
- The value to set as the 'lineColor' option of the markers.
Marker
instance for convenient method chaining.public Marker setLineColor(Color lineColor)
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.
lineColor
- The color gradient or color with an alpha channel to set as the 'lineColor' option of the markers.
Marker
instance for convenient method chaining.public Marker setLineWidth(Number lineWidth)
marker.setOption("lineWidth", 4);
The width of the point marker's outline. Defaults to 0.
lineWidth
- The width of the point marker's outline.
Marker
instance for convenient method chaining.public Marker setRadius(Number radius)
marker.setOption("radius", 4);
The radius of the point marker. Defaults to 0.
radius
- The radius of the point marker.
Marker
instance for convenient method chaining.public Marker setHoverState(Marker hoverState)
marker.setOption("/states/hover/enabled", true);
marker.setOption("/states/hover/radius", 8);
...
hoverState
- The configuration options to use for the markers on mouse hover.
Marker
instance for convenient method chaining.public Marker setSelectState(Marker selectState)
marker.setOption("/states/select/enabled", true);
marker.setOption("/states/select/radius", 8);
...
selectState
- The configuration options to use for the markers when selected.
Marker
instance for convenient method chaining.public Marker setSymbol(Marker.Symbol symbol)
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)");
symbol
- The shape or symbol for the marker.
Marker
instance for convenient method chaining.public Marker setSymbol(String symbolURL)
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")
);
symbolURL
- the url of the symbol to use for the marker.
Marker
instance for convenient method chaining.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |