-
public class PieChartRenderer extends DataRenderer
-
-
Field Summary
Fields Modifier and Type Field Description private PaintpaintHoleprivate PaintpaintTransparentCircleprivate final TextPaintpaintCenterTextprivate final PaintpaintEntryLabelsprivate FloatroundedCornerRadiusprivate PaintpaintRenderprivate PaintpaintHighlightprivate PaintpaintValues
-
Constructor Summary
Constructors Constructor Description PieChartRenderer(PieChart chart, ChartAnimator animator, ViewPortHandler viewPortHandler)
-
Method Summary
Modifier and Type Method Description final PaintgetPaintHole()paint for the hole in the center of the pie chart and the transparent circle final UnitsetPaintHole(Paint paintHole)final PaintgetPaintTransparentCircle()final UnitsetPaintTransparentCircle(Paint paintTransparentCircle)final TextPaintgetPaintCenterText()paint object for the text that can be displayed in the center of the chart final PaintgetPaintEntryLabels()paint object used for drwing the slice-text final FloatgetRoundedCornerRadius()final UnitsetRoundedCornerRadius(Float roundedCornerRadius)final PaintgetPaintRender()main paint object used for rendering final UnitsetPaintRender(Paint paintRender)final PaintgetPaintHighlight()paint used for highlighting values final UnitsetPaintHighlight(Paint paintHighlight)final PaintgetPaintValues()paint object for drawing values (text representing values of chart entries) final UnitsetPaintValues(Paint paintValues)UnitinitBuffers()Initializes the buffers used for rendering with a new size. UnitdrawData(Canvas c)Draws the actual data in form of lines, bars, ... UnitdrawValues(Canvas c)Loops over all Entries and draws their values. UnitdrawExtras(Canvas c)Draws any kind of additional information (e.g. UnitdrawHighlighted(Canvas c, Array<Highlight> indices)Draws all highlight indicators for the values that are currently highlighted. final UnitreleaseBitmap()Releases the drawing bitmap. -
-
Constructor Detail
-
PieChartRenderer
PieChartRenderer(PieChart chart, ChartAnimator animator, ViewPortHandler viewPortHandler)
-
-
Method Detail
-
getPaintHole
final Paint getPaintHole()
paint for the hole in the center of the pie chart and the transparent circle
-
setPaintHole
final Unit setPaintHole(Paint paintHole)
-
getPaintTransparentCircle
final Paint getPaintTransparentCircle()
-
setPaintTransparentCircle
final Unit setPaintTransparentCircle(Paint paintTransparentCircle)
-
getPaintCenterText
final TextPaint getPaintCenterText()
paint object for the text that can be displayed in the center of the chart
-
getPaintEntryLabels
final Paint getPaintEntryLabels()
paint object used for drwing the slice-text
-
getRoundedCornerRadius
final Float getRoundedCornerRadius()
-
setRoundedCornerRadius
final Unit setRoundedCornerRadius(Float roundedCornerRadius)
-
getPaintRender
final Paint getPaintRender()
main paint object used for rendering
-
setPaintRender
final Unit setPaintRender(Paint paintRender)
-
getPaintHighlight
final Paint getPaintHighlight()
paint used for highlighting values
-
setPaintHighlight
final Unit setPaintHighlight(Paint paintHighlight)
-
getPaintValues
final Paint getPaintValues()
paint object for drawing values (text representing values of chart entries)
-
setPaintValues
final Unit setPaintValues(Paint paintValues)
-
initBuffers
Unit initBuffers()
Initializes the buffers used for rendering with a new size. Since this method performs memory allocations, it should only be called if necessary.
-
drawData
Unit drawData(Canvas c)
Draws the actual data in form of lines, bars, ... depending on Renderer subclass.
-
drawValues
Unit drawValues(Canvas c)
Loops over all Entries and draws their values.
-
drawExtras
Unit drawExtras(Canvas c)
Draws any kind of additional information (e.g. line-circles).
-
drawHighlighted
Unit drawHighlighted(Canvas c, Array<Highlight> indices)
Draws all highlight indicators for the values that are currently highlighted.
- Parameters:
indices- the highlighted values
-
releaseBitmap
final Unit releaseBitmap()
Releases the drawing bitmap. This should be called when .
-
-
-
-