org.achartengine.chart
Class PieChart

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

public class PieChart
extends RoundChart

The pie chart rendering class.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.achartengine.chart.RoundChart
mCenterX, mCenterY, mDataset, mRenderer, NO_VALUE, SHAPE_WIDTH
 
Constructor Summary
PieChart(CategorySeries dataset, DefaultRenderer renderer)
          Builds a new pie 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 pie chart.
 SeriesSelection getSeriesAndPointForScreenCoordinate(Point screenPoint)
          Given screen coordinates, returns the series and point indexes of a chart element.
 
Methods inherited from class org.achartengine.chart.RoundChart
drawLegendShape, drawTitle, getCenterX, getCenterY, getLegendShapeWidth, getRenderer, setCenterX, setCenterY
 
Methods inherited from class org.achartengine.chart.AbstractChart
drawBackground, drawLabel, drawLegend, drawPath, drawPath, drawString, getExceed, getLabel, getLegendSize, isNullValue, isVertical
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PieChart

public PieChart(CategorySeries dataset,
                DefaultRenderer renderer)
Builds a new pie 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 pie 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

getSeriesAndPointForScreenCoordinate

public SeriesSelection getSeriesAndPointForScreenCoordinate(Point screenPoint)
Description copied from class: AbstractChart
Given screen coordinates, returns the series and point indexes of a chart element. If there is no chart element (line, point, bar, etc) at those coordinates, null is returned.

Overrides:
getSeriesAndPointForScreenCoordinate in class AbstractChart
Returns:
the series and point indexes


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