public class PieRenderer extends SeriesRenderer<PieChart,Segment,SegmentFormatter>
Modifier and Type | Class and Description |
---|---|
static class |
PieRenderer.DonutMode |
Constructor and Description |
---|
PieRenderer(PieChart plot) |
Modifier and Type | Method and Description |
---|---|
protected android.graphics.PointF |
calculateLineEnd(float x,
float y,
float rad,
float deg) |
protected android.graphics.PointF |
calculateLineEnd(android.graphics.PointF origin,
float rad,
float deg) |
protected double |
calculateScale(double[] values)
Determines how many counts there are per cent of whatever the
pie chart is displaying as a fraction, 1 being 100%.
|
protected void |
doDrawLegendIcon(android.graphics.Canvas canvas,
android.graphics.RectF rect,
SegmentFormatter formatter)
Draw the legend icon in the rect passed in.
|
protected void |
drawSegment(android.graphics.Canvas canvas,
android.graphics.RectF bounds,
Segment seg,
SegmentFormatter f,
float rad,
float startAngle,
float sweep) |
protected void |
drawSegmentLabel(android.graphics.Canvas canvas,
android.graphics.PointF origin,
Segment seg,
SegmentFormatter f) |
Segment |
getContainingSegment(android.graphics.PointF point)
Retrieve the segment containing the specified point.
|
float |
getEndDeg() |
float |
getRadius(android.graphics.RectF rect) |
float |
getStartDeg() |
protected double[] |
getValues() |
void |
onRender(android.graphics.Canvas canvas,
android.graphics.RectF plotArea,
Segment series,
SegmentFormatter formatter,
RenderStack stack) |
void |
setDonutSize(float size,
PieRenderer.DonutMode mode) |
void |
setEndDeg(float deg) |
void |
setStartDeg(float deg) |
drawSeriesLegendIcon, getFormatter, getPlot, getSeriesList, render, setPlot
public PieRenderer(PieChart plot)
public float getRadius(android.graphics.RectF rect)
public void onRender(android.graphics.Canvas canvas, android.graphics.RectF plotArea, Segment series, SegmentFormatter formatter, RenderStack stack) throws PlotRenderException
onRender
in class SeriesRenderer<PieChart,Segment,SegmentFormatter>
series
- The series to be renderedformatter
- The getFormatter that should be used to render the seriesstack
- Ordered list of all series being renderered. May be manipulated by the Renderer
to gain effect.PlotRenderException
protected void drawSegment(android.graphics.Canvas canvas, android.graphics.RectF bounds, Segment seg, SegmentFormatter f, float rad, float startAngle, float sweep)
protected void drawSegmentLabel(android.graphics.Canvas canvas, android.graphics.PointF origin, Segment seg, SegmentFormatter f)
protected void doDrawLegendIcon(android.graphics.Canvas canvas, android.graphics.RectF rect, SegmentFormatter formatter)
SeriesRenderer
doDrawLegendIcon
in class SeriesRenderer<PieChart,Segment,SegmentFormatter>
protected double calculateScale(double[] values)
protected double[] getValues()
protected android.graphics.PointF calculateLineEnd(float x, float y, float rad, float deg)
protected android.graphics.PointF calculateLineEnd(android.graphics.PointF origin, float rad, float deg)
public void setDonutSize(float size, PieRenderer.DonutMode mode)
public Segment getContainingSegment(android.graphics.PointF point)
point
- The clicked pointpublic void setStartDeg(float deg)
public float getStartDeg()
public void setEndDeg(float deg)
public float getEndDeg()