public class DoughnutChart extends RoundChart
autoCalculateCenter, mCenterX, mCenterY, mRenderer, NO_VALUE, SHAPE_WIDTH
Constructor and Description |
---|
DoughnutChart(MultipleCategorySeries dataset,
DefaultRenderer renderer)
Builds a new doughnut 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 doughnut chart.
|
void |
drawLegendShape(Canvas canvas,
SimpleSeriesRenderer renderer,
float x,
float y,
int seriesIndex,
Paint paint)
The graphical representation of the legend shape.
|
int |
getLegendShapeWidth(int seriesIndex)
Returns the legend shape width.
|
drawTitle, getCenterX, getCenterY, getRenderer, isAutocalculateCenter, setAutocalculateCenter, setCenterX, setCenterY
drawBackground, drawLabel, drawLegend, drawPath, drawPath, drawString, getExceed, getLabel, getLegendSize, getSeriesAndPointForScreenCoordinate, isNullValue, isVertical
public DoughnutChart(MultipleCategorySeries 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 int getLegendShapeWidth(int seriesIndex)
getLegendShapeWidth
in class RoundChart
seriesIndex
- the series indexpublic void drawLegendShape(Canvas canvas, SimpleSeriesRenderer renderer, float x, float y, int seriesIndex, Paint paint)
drawLegendShape
in class RoundChart
canvas
- the canvas to paint torenderer
- the series rendererx
- the x value of the point the shape should be drawn aty
- the y value of the point the shape should be drawn atseriesIndex
- the series indexpaint
- the paint to be used for drawing