public class PieRenderer extends SeriesRenderer
SeriesRenderer
that draws pies in its containing plot.Modifier and Type | Class and Description |
---|---|
protected static interface |
PieRenderer.ProcessSlice
Defines the signature of delegates called to process pie slices.
|
Constructor and Description |
---|
PieRenderer(Series series)
Initializes a new instance of the
PieRenderer class. |
PieRenderer(Series series,
int dimension)
Initializes a new instance of the
PieRenderer class. |
Modifier and Type | Method and Description |
---|---|
protected void |
draw(RenderContext context)
SeriesRenderer.draw override.
|
protected void |
drawHighlight(RenderContext context,
HitResult hitResult)
SeriesRenderer.drawHighlight override.
|
java.util.stream.Stream<Series> |
enumSeries()
Implements the SeriesContainer interface.
|
protected void |
enumSlices(RenderContext context,
PieRenderer.ProcessSlice process)
Enumerates the slices of the pie.
|
double |
getDetachOffset()
Gets the percentage by which detached slices are offset from pie center.
|
int |
getDimension()
Gets the dimension index that should be used to read data from the Series.
|
boolean |
getDoughnut()
Gets a value indicating whether the pie should be rendered as a doughnut.
|
Series |
getSeries()
Gets the Series drawn by this PieRenderer.
|
HitResult |
hitTest(RenderContext context,
java.awt.geom.Point2D location)
SeriesRenderer.hitTest override.
|
void |
setDetachOffset(double value)
Sets the percentage by which detached slices are offset from pie center.
|
void |
setDimension(int value)
Sets the dimension index that should be used to read data from the Series.
|
void |
setDoughnut(boolean value)
Sets a value indicating whether the pie should be rendered as a doughnut.
|
void |
setSeries(Series value)
Sets the Series drawn by this PieRenderer.
|
addPropertyChangeListener, createTextRenderer, dataChanged, domainDimension, effectiveFill, effectiveLabelBackground, effectiveLabelBorderPen, effectiveStroke, getLabelBrush, getLabelFontName, getLabelFontSize, getLabelFontStyle, getSeriesStyle, getShowDataLabels, getShowHighlight, getShowToolTips, onPropertyChanged, onSeriesDataChanged, removePropertyChangeListener, searchStyle, setLabelBrush, setLabelFontName, setLabelFontSize, setLabelFontStyle, setSeriesStyle, setShowDataLabels, setShowHighlight, setShowToolTips, setToolTip, startMeasureData
public PieRenderer(Series series)
PieRenderer
class.series
- The Series
that should be rendered as a pie.public PieRenderer(Series series, int dimension)
PieRenderer
class.series
- The Series
that should be rendered as a pie.dimension
- Specifies the Series dimension index that should be used to access data.public Series getSeries()
public void setSeries(Series value)
protected void enumSlices(RenderContext context, PieRenderer.ProcessSlice process)
context
- A RenderContext instance.process
- A ProcessBars callback.public double getDetachOffset()
public void setDetachOffset(double value)
public boolean getDoughnut()
public void setDoughnut(boolean value)
public int getDimension()
public void setDimension(int value)
protected void draw(RenderContext context)
context
- A RenderContext instance.protected void drawHighlight(RenderContext context, HitResult hitResult)
context
- A RenderContext instance.hitResult
- A HitResult instance identifying highlighted data item.public HitResult hitTest(RenderContext context, java.awt.geom.Point2D location)
hitTest
in class SeriesRenderer
context
- A RenderContext instance.location
- A PointD specifying where to look for a pie slice.public java.util.stream.Stream<Series> enumSeries()
enumSeries
in interface SeriesContainer
enumSeries
in class SeriesRenderer