|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.achartengine.chart.AbstractChart
org.achartengine.chart.XYChart
org.achartengine.chart.BarChart
public class BarChart
The bar chart rendering class.
| Nested Class Summary | |
|---|---|
static class |
BarChart.Type
The bar chart type enum. |
| Field Summary | |
|---|---|
protected BarChart.Type |
mType
The chart type. |
static java.lang.String |
TYPE
The constant to identify this chart type. |
| Fields inherited from class org.achartengine.chart.XYChart |
|---|
mDataset, mRenderer |
| Constructor Summary | |
|---|---|
BarChart(XYMultipleSeriesDataset dataset,
XYMultipleSeriesRenderer renderer,
BarChart.Type type)
Builds a new bar chart instance. |
|
| Method Summary | |
|---|---|
protected android.graphics.RectF[] |
clickableAreasForPoints(float[] points,
float yAxisValue,
int seriesIndex)
Returns the clickable areas for all passed points |
protected void |
drawBar(android.graphics.Canvas canvas,
float xMin,
float yMin,
float xMax,
float yMax,
float halfDiffX,
int seriesNr,
int seriesIndex,
android.graphics.Paint paint)
Draws a bar. |
protected void |
drawChartValuesText(android.graphics.Canvas canvas,
XYSeries series,
SimpleSeriesRenderer renderer,
android.graphics.Paint paint,
float[] points,
int seriesIndex)
The graphical representation of the series values as text. |
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 |
drawSeries(android.graphics.Canvas canvas,
android.graphics.Paint paint,
float[] points,
SimpleSeriesRenderer seriesRenderer,
float yAxisValue,
int seriesIndex)
The graphical representation of a series. |
java.lang.String |
getChartType()
Returns the chart type identifier. |
protected float |
getCoeficient()
Returns the value of a constant used to calculate the half-distance. |
double |
getDefaultMinimum()
Returns the default axis minimum. |
protected float |
getHalfDiffX(float[] points,
int length,
int seriesNr)
Calculates and returns the half-distance in the graphical representation of 2 consecutive points. |
int |
getLegendShapeWidth(int seriesIndex)
Returns the legend shape width. |
protected boolean |
isRenderNullValues()
Returns if the chart should display the null values. |
| Methods inherited from class org.achartengine.chart.XYChart |
|---|
draw, drawSeries, drawText, drawXLabels, drawXTextLabels, getCalcRange, getDataset, getLabel, getPointsChart, getRenderer, getScreenR, getSeriesAndPointForScreenCoordinate, isRenderPoints, setCalcRange, setDatasetRenderer, setScreenR, toRealPoint, toRealPoint, toScreenPoint, toScreenPoint |
| Methods inherited from class org.achartengine.chart.AbstractChart |
|---|
drawBackground, drawLabel, drawLegend, drawPath, getExceed, getLegendSize, isVertical |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String TYPE
protected BarChart.Type mType
| Constructor Detail |
|---|
public BarChart(XYMultipleSeriesDataset dataset,
XYMultipleSeriesRenderer renderer,
BarChart.Type type)
dataset - the multiple series datasetrenderer - the multiple series renderertype - the bar chart type| Method Detail |
|---|
protected android.graphics.RectF[] clickableAreasForPoints(float[] points,
float yAxisValue,
int seriesIndex)
XYChart
clickableAreasForPoints in class XYChartpoints - the array of pointsyAxisValue - the minimum value of the y axisseriesIndex - the index of the series to which the points belong
public void drawSeries(android.graphics.Canvas canvas,
android.graphics.Paint paint,
float[] points,
SimpleSeriesRenderer seriesRenderer,
float yAxisValue,
int seriesIndex)
drawSeries in class XYChartcanvas - the canvas to paint topaint - the paint to be used for drawingpoints - the array of points to be used for drawing the seriesseriesRenderer - the series rendereryAxisValue - the minimum value of the y axisseriesIndex - the index of the series currently being drawn
protected void drawBar(android.graphics.Canvas canvas,
float xMin,
float yMin,
float xMax,
float yMax,
float halfDiffX,
int seriesNr,
int seriesIndex,
android.graphics.Paint paint)
canvas - the canvasxMin - the X axis minimumyMin - the Y axis minimumxMax - the X axis maximumyMax - the Y axis maximumhalfDiffX - half the size of a barseriesNr - the total number of seriesseriesIndex - the current series indexpaint - the paint
protected void drawChartValuesText(android.graphics.Canvas canvas,
XYSeries series,
SimpleSeriesRenderer renderer,
android.graphics.Paint paint,
float[] points,
int seriesIndex)
drawChartValuesText in class XYChartcanvas - the canvas to paint toseries - the series to be paintedrenderer - the series rendererpaint - the paint to be used for drawingpoints - the array of points to be used for drawing the seriesseriesIndex - the index of the series currently being drawnpublic int getLegendShapeWidth(int seriesIndex)
getLegendShapeWidth in class AbstractChartseriesIndex - the series index
public void drawLegendShape(android.graphics.Canvas canvas,
SimpleSeriesRenderer renderer,
float x,
float y,
int seriesIndex,
android.graphics.Paint paint)
drawLegendShape in class AbstractChartcanvas - 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 float getHalfDiffX(float[] points,
int length,
int seriesNr)
points - the pointslength - the points lengthseriesNr - the series number
protected float getCoeficient()
protected boolean isRenderNullValues()
isRenderNullValues in class XYChartpublic double getDefaultMinimum()
getDefaultMinimum in class XYChartpublic java.lang.String getChartType()
getChartType in class XYChart
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||