public class PieChart extends RoundChart
autoCalculateCenter, mCenterX, mCenterY, mDataset, mRenderer, NO_VALUE, SHAPE_WIDTH
Constructor and Description |
---|
PieChart(CategorySeries dataset,
DefaultRenderer renderer)
Builds a new pie chart instance.
|
Modifier and Type | Method and Description |
---|---|
void |
draw(Canvas canvas,
int x,
int y,
int width,
int height,
Paint paint)
The graphical representation of the pie chart.
|
Shape |
getSegmentShape(int pointIndex)
Gets the shape of a pie segment given its point index.
|
SeriesSelection |
getSeriesAndPointForScreenCoordinate(Point screenPoint)
Given screen coordinates, returns the series and point indexes of a chart
element.
|
drawLegendShape, drawTitle, getCenterX, getCenterY, getLegendShapeWidth, getRenderer, isAutocalculateCenter, setAutocalculateCenter, setCenterX, setCenterY
drawBackground, drawLabel, drawLegend, drawPath, drawPath, drawString, getExceed, getLabel, getLegendSize, isNullValue, isVertical
public PieChart(CategorySeries dataset, DefaultRenderer renderer)
dataset
- the series datasetrenderer
- the series rendererpublic void draw(Canvas canvas, int x, int y, int width, int height, Paint paint)
draw
in class AbstractChart
canvas
- the canvas to paint tox
- the top left x value of the view to draw toy
- the top left y value of the view to draw towidth
- the width of the view to draw toheight
- the height of the view to draw topaint
- the paintpublic SeriesSelection getSeriesAndPointForScreenCoordinate(Point screenPoint)
AbstractChart
getSeriesAndPointForScreenCoordinate
in class AbstractChart
public Shape getSegmentShape(int pointIndex)
pointIndex
- The point index representing the pie segment.