public class PieChartRenderer extends DataRenderer
| Modifier and Type | Field and Description |
|---|---|
protected android.graphics.Canvas |
mBitmapCanvas |
protected PieChart |
mChart |
protected android.graphics.Bitmap |
mDrawBitmap
Bitmap for drawing the center hole
|
protected android.graphics.Paint |
mHolePaint
paint for the hole in the center of the pie chart and the transparent
circle
|
protected android.graphics.Paint |
mTransparentCirclePaint |
mAnimator, mDrawPaint, mHighlightPaint, mRenderPaint, mValuePaintmMaxX, mMinX, mViewPortHandler| Constructor and Description |
|---|
PieChartRenderer(PieChart chart,
ChartAnimator animator,
ViewPortHandler viewPortHandler) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
drawCenterText(android.graphics.Canvas c)
draws the description text in the center of the pie chart makes most
sense when center-hole is enabled
|
void |
drawData(android.graphics.Canvas c)
Draws the actual data in form of lines, bars, ...
|
protected void |
drawDataSet(android.graphics.Canvas c,
PieDataSet dataSet) |
void |
drawExtras(android.graphics.Canvas c)
Draws any kind of additional information (e.g.
|
void |
drawHighlighted(android.graphics.Canvas c,
Highlight[] indices)
Draws all highlight indicators for the values that are currently highlighted.
|
protected void |
drawHole(android.graphics.Canvas c)
draws the hole in the center of the chart and the transparent circle /
hole
|
protected void |
drawRoundedSlices(android.graphics.Canvas c)
This gives all pie-slices a rounded edge.
|
void |
drawValues(android.graphics.Canvas c)
Loops over all Entrys and draws their values.
|
android.text.TextPaint |
getPaintCenterText() |
android.graphics.Paint |
getPaintHole() |
android.graphics.Paint |
getPaintTransparentCircle() |
void |
initBuffers()
Initializes the buffers used for rendering with a new size.
|
void |
releaseBitmap()
Releases the drawing bitmap.
|
applyValueTextStyle, drawValue, getPaintHighlight, getPaintRender, getPaintValuescalcXBounds, fitsBoundsprotected PieChart mChart
protected android.graphics.Paint mHolePaint
protected android.graphics.Paint mTransparentCirclePaint
protected android.graphics.Bitmap mDrawBitmap
protected android.graphics.Canvas mBitmapCanvas
public PieChartRenderer(PieChart chart, ChartAnimator animator, ViewPortHandler viewPortHandler)
public android.graphics.Paint getPaintHole()
public android.graphics.Paint getPaintTransparentCircle()
public android.text.TextPaint getPaintCenterText()
public void initBuffers()
DataRendererinitBuffers in class DataRendererpublic void drawData(android.graphics.Canvas c)
DataRendererdrawData in class DataRendererprotected void drawDataSet(android.graphics.Canvas c,
PieDataSet dataSet)
public void drawValues(android.graphics.Canvas c)
DataRendererdrawValues in class DataRendererpublic void drawExtras(android.graphics.Canvas c)
DataRendererdrawExtras in class DataRendererprotected void drawHole(android.graphics.Canvas c)
protected void drawCenterText(android.graphics.Canvas c)
public void drawHighlighted(android.graphics.Canvas c,
Highlight[] indices)
DataRendererdrawHighlighted in class DataRendererindices - the highlighted valuesprotected void drawRoundedSlices(android.graphics.Canvas c)
c - public void releaseBitmap()
LineChart.onDetachedFromWindow().