org.achartengine.chart
Class DoughnutChart

java.lang.Object
  extended by org.achartengine.chart.AbstractChart
      extended by org.achartengine.chart.RoundChart
          extended by org.achartengine.chart.DoughnutChart
All Implemented Interfaces:
java.io.Serializable

public class DoughnutChart
extends RoundChart

The doughnut chart rendering class.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.achartengine.chart.RoundChart
mCenterX, mCenterY, mRenderer, NO_VALUE, SHAPE_WIDTH
 
Constructor Summary
DoughnutChart(MultipleCategorySeries dataset, DefaultRenderer renderer)
          Builds a new doughnut chart instance.
 
Method Summary
 void draw(android.graphics.Canvas canvas, int x, int y, int width, int height, android.graphics.Paint paint)
          The graphical representation of the doughnut chart.
 void drawLegendShape(android.graphics.Canvas canvas, SimpleSeriesRenderer renderer, float x, float y, int seriesIndex, android.graphics.Paint paint)
          The graphical representation of the legend shape.
 int getLegendShapeWidth(int seriesIndex)
          Returns the legend shape width.
 
Methods inherited from class org.achartengine.chart.RoundChart
drawTitle, getCenterX, getCenterY, getRenderer, setCenterX, setCenterY
 
Methods inherited from class org.achartengine.chart.AbstractChart
drawBackground, drawLabel, drawLegend, drawPath, drawPath, drawString, getExceed, getLabel, getLegendSize, getSeriesAndPointForScreenCoordinate, isNullValue, isVertical
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoughnutChart

public DoughnutChart(MultipleCategorySeries dataset,
                     DefaultRenderer renderer)
Builds a new doughnut chart instance.

Parameters:
dataset - the series dataset
renderer - the series renderer
Method Detail

draw

public void draw(android.graphics.Canvas canvas,
                 int x,
                 int y,
                 int width,
                 int height,
                 android.graphics.Paint paint)
The graphical representation of the doughnut chart.

Specified by:
draw in class AbstractChart
Parameters:
canvas - the canvas to paint to
x - the top left x value of the view to draw to
y - the top left y value of the view to draw to
width - the width of the view to draw to
height - the height of the view to draw to
paint - the paint

getLegendShapeWidth

public int getLegendShapeWidth(int seriesIndex)
Returns the legend shape width.

Overrides:
getLegendShapeWidth in class RoundChart
Parameters:
seriesIndex - the series index
Returns:
the legend shape width

drawLegendShape

public void drawLegendShape(android.graphics.Canvas canvas,
                            SimpleSeriesRenderer renderer,
                            float x,
                            float y,
                            int seriesIndex,
                            android.graphics.Paint paint)
The graphical representation of the legend shape.

Overrides:
drawLegendShape in class RoundChart
Parameters:
canvas - the canvas to paint to
renderer - the series renderer
x - the x value of the point the shape should be drawn at
y - the y value of the point the shape should be drawn at
seriesIndex - the series index
paint - the paint to be used for drawing


Copyright © 2009 - 2011 4ViewSoft. All Rights Reserved.