org.achartengine.chart
Class RoundChart

java.lang.Object
  extended by org.achartengine.chart.AbstractChart
      extended by org.achartengine.chart.RoundChart
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DialChart, DoughnutChart, PieChart

public abstract class RoundChart
extends AbstractChart

An abstract class to be extended by round like chart rendering classes.

See Also:
Serialized Form

Field Summary
protected  int mCenterX
          The chart center X axis.
protected  int mCenterY
          The chart center y axis.
protected  CategorySeries mDataset
          The series dataset.
protected  DefaultRenderer mRenderer
          The series renderer.
protected static int NO_VALUE
          A no value constant.
protected static int SHAPE_WIDTH
          The legend shape width.
 
Constructor Summary
RoundChart(CategorySeries dataset, DefaultRenderer renderer)
          Round chart.
 
Method Summary
 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.
 void drawTitle(android.graphics.Canvas canvas, int x, int y, int width, android.graphics.Paint paint)
          The graphical representation of the round chart title.
 int getCenterX()
          Returns the center on X axis.
 int getCenterY()
          Returns the center on Y axis.
 int getLegendShapeWidth(int seriesIndex)
          Returns the legend shape width.
 DefaultRenderer getRenderer()
          Returns the renderer.
 void setCenterX(int centerX)
          Sets a new center on X axis.
 void setCenterY(int centerY)
          Sets a new center on Y axis.
 
Methods inherited from class org.achartengine.chart.AbstractChart
draw, 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
 

Field Detail

SHAPE_WIDTH

protected static final int SHAPE_WIDTH
The legend shape width.

See Also:
Constant Field Values

mDataset

protected CategorySeries mDataset
The series dataset.


mRenderer

protected DefaultRenderer mRenderer
The series renderer.


NO_VALUE

protected static final int NO_VALUE
A no value constant.

See Also:
Constant Field Values

mCenterX

protected int mCenterX
The chart center X axis.


mCenterY

protected int mCenterY
The chart center y axis.

Constructor Detail

RoundChart

public RoundChart(CategorySeries dataset,
                  DefaultRenderer renderer)
Round chart.

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

drawTitle

public void drawTitle(android.graphics.Canvas canvas,
                      int x,
                      int y,
                      int width,
                      android.graphics.Paint paint)
The graphical representation of the round chart title.

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
paint - the paint

getLegendShapeWidth

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

Specified by:
getLegendShapeWidth in class AbstractChart
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.

Specified by:
drawLegendShape in class AbstractChart
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

getRenderer

public DefaultRenderer getRenderer()
Returns the renderer.

Returns:
the renderer

getCenterX

public int getCenterX()
Returns the center on X axis.

Returns:
the center on X axis

getCenterY

public int getCenterY()
Returns the center on Y axis.

Returns:
the center on Y axis

setCenterX

public void setCenterX(int centerX)
Sets a new center on X axis.

Parameters:
centerX - center on X axis

setCenterY

public void setCenterY(int centerY)
Sets a new center on Y axis.

Parameters:
centerY - center on Y axis


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