public abstract class RoundChart extends AbstractChart
Modifier and Type | Field and Description |
---|---|
protected boolean |
autoCalculateCenter |
protected int |
mCenterX
The chart center X axis.
|
protected int |
mCenterY
The chart center y axis.
|
protected CategorySeries |
mDataset
The series dataset.
|
protected DefaultRenderer |
mRenderer
The series renderer.
|
protected static int |
NO_VALUE
A no value constant.
|
protected static int |
SHAPE_WIDTH
The legend shape width.
|
Constructor and Description |
---|
RoundChart(CategorySeries dataset,
DefaultRenderer renderer)
Round chart.
|
Modifier and Type | Method and Description |
---|---|
void |
drawLegendShape(Canvas canvas,
SimpleSeriesRenderer renderer,
float x,
float y,
int seriesIndex,
Paint paint)
The graphical representation of the legend shape.
|
void |
drawTitle(Canvas canvas,
int x,
int y,
int width,
Paint paint)
The graphical representation of the round chart title.
|
int |
getCenterX()
Returns the center on X axis.
|
int |
getCenterY()
Returns the center on Y axis.
|
int |
getLegendShapeWidth(int seriesIndex)
Returns the legend shape width.
|
DefaultRenderer |
getRenderer()
Returns the renderer.
|
boolean |
isAutocalculateCenter() |
void |
setAutocalculateCenter(boolean a) |
void |
setCenterX(int centerX)
Sets a new center on X axis.
|
void |
setCenterY(int centerY)
Sets a new center on Y axis.
|
draw, drawBackground, drawLabel, drawLegend, drawPath, drawPath, drawString, getExceed, getLabel, getLegendSize, getSeriesAndPointForScreenCoordinate, isNullValue, isVertical
protected static final int SHAPE_WIDTH
protected CategorySeries mDataset
protected DefaultRenderer mRenderer
protected static final int NO_VALUE
protected int mCenterX
protected int mCenterY
protected boolean autoCalculateCenter
public RoundChart(CategorySeries dataset, DefaultRenderer renderer)
dataset
- the series datasetrenderer
- the series rendererpublic void drawTitle(Canvas canvas, int x, int y, int width, Paint paint)
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 topaint
- the paintpublic int getLegendShapeWidth(int seriesIndex)
getLegendShapeWidth
in class AbstractChart
seriesIndex
- the series indexpublic void drawLegendShape(Canvas canvas, SimpleSeriesRenderer renderer, float x, float y, int seriesIndex, Paint paint)
drawLegendShape
in class AbstractChart
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 drawingpublic DefaultRenderer getRenderer()
public int getCenterX()
public int getCenterY()
public void setCenterX(int centerX)
centerX
- center on X axispublic void setCenterY(int centerY)
centerY
- center on Y axispublic void setAutocalculateCenter(boolean a)
public boolean isAutocalculateCenter()