M
- the data type used by this seriespublic class GaugeSeries<M> extends AbstractPieSeries<M>
GaugeSeries gauge = new GaugeSeries(); gauge.setAngleField(provider); gauge.addColor(RGB.GREEN); gauge.addColor(new RGB("#ddd")); chart.addSeries(gauge);First the series is created with its associated data type. Next the value provider field is set, which provides the value of the gauge. Two colors are added the first representing the slider color and the second representing the background. Finally the series is added to the chart where it will be displayed.
Series.LabelPosition
angleField, center, donut, margin, radius, slices
colors
bbox, chart, handlerManager, highlighter, highlighting, labelConfig, labels, lastHighlighted, legendNames, legendTitles, renderer, shadowAttributes, shadowed, shadowGroups, shadowRenderer, shownInLegend, sprites, stroke, strokeWidth, toolTip, toolTipConfig, xField
Constructor and Description |
---|
GaugeSeries()
Creates a gauge
Series . |
Modifier and Type | Method and Description |
---|---|
void |
drawSeries()
Draws the series for the current chart.
|
protected int |
getIndex(PrecisePoint point)
Returns the series index from the given point.
|
protected ValueProvider<M,? extends Number> |
getValueProvider(int index)
Returns the value at the given series index.
|
void |
hide(int yFieldIndex)
Hides the given y field index from the series.
|
void |
highlight(int yFieldIndex)
Highlights the series at the given series index.
|
void |
highlightAll(int index)
Highlights all of the items in the series.
|
boolean |
isNeedle()
Returns whether or not the series uses a needle in place of a wedge.
|
int |
onMouseMove(PrecisePoint point,
Event event)
Method used when the series is moused over.
|
void |
onMouseOut(PrecisePoint point,
Event event)
Method used when the mouse leaves the series.
|
void |
setNeedle(boolean needle)
Sets whether or not the series uses a needle in place of a wedge.
|
void |
show(int yFieldIndex)
Shows the given y field index from the series.
|
void |
unHighlight(int yFieldIndex)
Removes highlighting from the given series index.
|
void |
unHighlightAll(int index)
UnHighlights all items in the series.
|
boolean |
visibleInLegend(int index)
Returns whether or not the given series index is visible in legend.
|
calculateSegment, createSegmentAnimator, getAngleField, getDonut, getLegendLabelProvider, getLegendTitles, getStoreIndex, setAngleField, setDonut, setLegendLabelProvider, setLegendValueProvider
addColor, addColor, getColor, getColors, removeColor, removeColor, setColor
addSeriesHandler, addSeriesItemOutHandler, addSeriesItemOverHandler, addSeriesItemUpHandler, addSeriesSelectionHandler, calculateBBox, clear, ensureHandlers, getBBox, getChart, getGutters, getHighlighter, getLabelConfig, getLegendNames, getPointFromCommand, getRenderer, getShadowRenderer, getStroke, getStrokeWidth, getToolTip, getToolTipConfig, getValueProviderName, getXField, hideShadows, hideToolTip, highlightedState, isHighlighting, isShownInLegend, onMouseDown, onMouseUp, removeToolTip, setChart, setHighlighter, setHighlighting, setLabelConfig, setLabelContrast, setLabelText, setRenderer, setShadowRenderer, setShownInLegend, setStroke, setStrokeWidth, setToolTipConfig, setXField
public GaugeSeries()
Series
.public void drawSeries()
Series
drawSeries
in class Series<M>
public void hide(int yFieldIndex)
Series
public void highlight(int yFieldIndex)
Series
public void highlightAll(int index)
Series
highlightAll
in class Series<M>
index
- the index of the seriespublic boolean isNeedle()
public int onMouseMove(PrecisePoint point, Event event)
Series
onMouseMove
in class Series<M>
point
- the point moused overpublic void onMouseOut(PrecisePoint point, Event event)
Series
onMouseOut
in class Series<M>
point
- the point leftpublic void setNeedle(boolean needle)
needle
- true if needlepublic void show(int yFieldIndex)
Series
public void unHighlight(int yFieldIndex)
Series
unHighlight
in class Series<M>
yFieldIndex
- the index to have its highlighting removedpublic void unHighlightAll(int index)
Series
unHighlightAll
in class Series<M>
index
- the index of the seriespublic boolean visibleInLegend(int index)
Series
visibleInLegend
in class Series<M>
index
- the series index to determine visibleprotected int getIndex(PrecisePoint point)
Series
protected ValueProvider<M,? extends Number> getValueProvider(int index)
Series
getValueProvider
in class Series<M>
index
- the series indexCopyright © 2018. All rights reserved.