|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.achartengine.chart.AbstractChart
public abstract class AbstractChart
An abstract class to be implemented by the chart rendering classes.
| Constructor Summary | |
|---|---|
AbstractChart()
|
|
| Method Summary | |
|---|---|
abstract void |
draw(android.graphics.Canvas canvas,
int x,
int y,
int width,
int height,
android.graphics.Paint paint)
The graphical representation of the chart. |
protected void |
drawBackground(DefaultRenderer renderer,
android.graphics.Canvas canvas,
int x,
int y,
int width,
int height,
android.graphics.Paint paint,
boolean newColor,
int color)
Draws the chart background. |
protected void |
drawLabel(android.graphics.Canvas canvas,
java.lang.String labelText,
DefaultRenderer renderer,
java.util.List<android.graphics.RectF> prevLabelsBounds,
int centerX,
int centerY,
float shortRadius,
float longRadius,
float currentAngle,
float angle,
int left,
int right,
android.graphics.Paint paint)
Draws a text label. |
protected int |
drawLegend(android.graphics.Canvas canvas,
DefaultRenderer renderer,
java.lang.String[] titles,
int left,
int right,
int y,
int width,
int height,
int legendSize,
android.graphics.Paint paint,
boolean calculate)
Draws the chart legend. |
abstract 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. |
protected void |
drawPath(android.graphics.Canvas canvas,
float[] points,
android.graphics.Paint paint,
boolean circular)
The graphical representation of a path. |
protected boolean |
getExceed(float currentWidth,
DefaultRenderer renderer,
int right,
int width)
Calculates if the current width exceeds the total width. |
abstract int |
getLegendShapeWidth(int seriesIndex)
Returns the legend shape width. |
protected int |
getLegendSize(DefaultRenderer renderer,
int defaultHeight,
float extraHeight)
Calculates the current legend size. |
SeriesSelection |
getSeriesAndPointForScreenCoordinate(Point screenPoint)
Given screen coordinates, returns the series and point indexes of a chart element. |
protected boolean |
isVertical(DefaultRenderer renderer)
Checks if the current chart is rendered as vertical. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractChart()
| Method Detail |
|---|
public abstract void draw(android.graphics.Canvas canvas,
int x,
int y,
int width,
int height,
android.graphics.Paint paint)
canvas - the canvas to paint tox - the top left x value of the view to draw toy - the top left y value of the view to draw towidth - the width of the view to draw toheight - the height of the view to draw topaint - the paint
protected void drawBackground(DefaultRenderer renderer,
android.graphics.Canvas canvas,
int x,
int y,
int width,
int height,
android.graphics.Paint paint,
boolean newColor,
int color)
renderer - the chart renderercanvas - the canvas to paint tox - the top left x value of the view to draw toy - the top left y value of the view to draw towidth - the width of the view to draw toheight - the height of the view to draw topaint - the paint used for drawingnewColor - if a new color is to be usedcolor - the color to be used
protected int drawLegend(android.graphics.Canvas canvas,
DefaultRenderer renderer,
java.lang.String[] titles,
int left,
int right,
int y,
int width,
int height,
int legendSize,
android.graphics.Paint paint,
boolean calculate)
canvas - the canvas to paint torenderer - the series renderertitles - the titles to go to the legendleft - the left X value of the area to draw toright - the right X value of the area to draw toy - the y value of the area to draw towidth - the width of the area to draw toheight - the height of the area to draw tolegendSize - the legend sizepaint - the paint to be used for drawingcalculate - if only calculating the legend size
protected boolean getExceed(float currentWidth,
DefaultRenderer renderer,
int right,
int width)
currentWidth - the current widthrenderer - the rendererright - the right side pixel valuewidth - the total width
protected boolean isVertical(DefaultRenderer renderer)
renderer - the renderer
protected void drawPath(android.graphics.Canvas canvas,
float[] points,
android.graphics.Paint paint,
boolean circular)
canvas - the canvas to paint topoints - the points that are contained in the path to paintpaint - the paint to be used for paintingcircular - if the path ends with the start pointpublic abstract int getLegendShapeWidth(int seriesIndex)
seriesIndex - the series index
public abstract void drawLegendShape(android.graphics.Canvas canvas,
SimpleSeriesRenderer renderer,
float x,
float y,
int seriesIndex,
android.graphics.Paint paint)
canvas - the canvas to paint torenderer - the series rendererx - the x value of the point the shape should be drawn aty - the y value of the point the shape should be drawn atseriesIndex - the series indexpaint - the paint to be used for drawing
protected int getLegendSize(DefaultRenderer renderer,
int defaultHeight,
float extraHeight)
renderer - the rendererdefaultHeight - the default heightextraHeight - the added extra height
protected void drawLabel(android.graphics.Canvas canvas,
java.lang.String labelText,
DefaultRenderer renderer,
java.util.List<android.graphics.RectF> prevLabelsBounds,
int centerX,
int centerY,
float shortRadius,
float longRadius,
float currentAngle,
float angle,
int left,
int right,
android.graphics.Paint paint)
canvas - the canvaslabelText - the label textrenderer - the rendererprevLabelsBounds - the previous rendered label boundscenterX - the round chart center on X axiscenterY - the round chart center on Y axisshortRadius - the short radius for the round chartlongRadius - the long radius for the round chartcurrentAngle - the current angleangle - the label extra angleleft - the left sideright - the right sidepaint - the paintpublic SeriesSelection getSeriesAndPointForScreenCoordinate(Point screenPoint)
screenPoint -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||