AndBase开发框架  1.6
 全部  命名空间 文件 函数 变量 枚举值 
| Public 成员函数 | 静态 Public 属性 | Protected 成员函数 | Protected 属性 | 包函数 | Private 成员函数 | 静态 Private 属性 | 所有成员列表
com.ab.view.chart.BarChart类 参考
类 com.ab.view.chart.BarChart 继承关系图:
com.ab.view.chart.XYChart com.ab.view.chart.AbstractChart

enum  Type
 

Public 成员函数

 BarChart (XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, Type type)
 
void drawSeries (Canvas canvas, Paint paint, float[] points, int[] colors, SimpleSeriesRenderer seriesRenderer, float yAxisValue, int seriesIndex, int startIndex)
 
int getLegendShapeWidth (int seriesIndex)
 
void drawLegendShape (Canvas canvas, SimpleSeriesRenderer renderer, float x, float y, int seriesIndex, Paint paint)
 
double getDefaultMinimum ()
 
String getChartType ()
 
- Public 成员函数 继承自 com.ab.view.chart.XYChart
 XYChart (XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer)
 
void draw (Canvas canvas, int x, int y, int width, int height, Paint paint)
 
XYMultipleSeriesRenderer getRenderer ()
 
XYMultipleSeriesDataset getDataset ()
 
double[] getCalcRange (int scale)
 
void setCalcRange (double[] range, int scale)
 
double[] toRealPoint (float screenX, float screenY)
 
double[] toScreenPoint (double[] realPoint)
 
double[] toRealPoint (float screenX, float screenY, int scale)
 
double[] toScreenPoint (double[] realPoint, int scale)
 
SeriesSelection getSeriesAndPointForScreenCoordinate (final Point screenPoint)
 
abstract void drawSeries (Canvas canvas, Paint paint, float[] points, int[] colors, SimpleSeriesRenderer seriesRenderer, float yAxisValue, int seriesIndex, int startIndex)
 
boolean isRenderPoints (SimpleSeriesRenderer renderer)
 
double getDefaultMinimum ()
 
ScatterChart getPointsChart ()
 
abstract String getChartType ()
 
Map< Integer, List< Float > > getPoints ()
 
Map< Integer, List< Double > > getValues ()
 
Map< Integer, List< String > > getExplains ()
 
- Public 成员函数 继承自 com.ab.view.chart.AbstractChart
abstract void draw (Canvas canvas, int x, int y, int width, int height, Paint paint)
 
boolean isVertical (DefaultRenderer renderer)
 
abstract int getLegendShapeWidth (int seriesIndex)
 
abstract void drawLegendShape (Canvas canvas, SimpleSeriesRenderer renderer, float x, float y, int seriesIndex, Paint paint)
 
boolean isNullValue (double value)
 
SeriesSelection getSeriesAndPointForScreenCoordinate (Point screenPoint)
 

静态 Public 属性

static final String TYPE = "Bar"
 

Protected 成员函数

ClickableArea[] clickableAreasForPoints (float[] points, double[] values, float yAxisValue, int seriesIndex, int startIndex)
 
void drawBar (Canvas canvas, float xMin, float yMin, float xMax, float yMax, float halfDiffX, int seriesNr, int seriesIndex, Paint paint)
 
void drawChartValuesText (Canvas canvas, XYSeries series, SimpleSeriesRenderer renderer, Paint paint, float[] points, int seriesIndex, int startIndex)
 
float getHalfDiffX (float[] points, int length, int seriesNr)
 
float getCoeficient ()
 
boolean isRenderNullValues ()
 
- Protected 成员函数 继承自 com.ab.view.chart.XYChart
 XYChart ()
 
void setDatasetRenderer (XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer)
 
List< Double > getXLabels (double min, double max, int count)
 
Map< Integer, List< Double > > getYLabels (double[] minY, double[] maxY, int maxScaleNumber)
 
Rect getScreenR ()
 
void setScreenR (Rect screenR)
 
void drawSeries (XYSeries series, Canvas canvas, Paint paint, List< Float > pointsList, List< Integer > colorsList, SimpleSeriesRenderer seriesRenderer, float yAxisValue, int seriesIndex, Orientation or, int startIndex)
 
void drawChartValuesText (Canvas canvas, XYSeries series, SimpleSeriesRenderer renderer, Paint paint, float[] points, int seriesIndex, int startIndex)
 
void drawText (Canvas canvas, String text, float x, float y, Paint paint, float extraAngle)
 
void drawXLabels (List< Double > xLabels, Double[] xTextLabelLocations, Canvas canvas, Paint paint, int left, int top, int bottom, double xPixelsPerUnit, double minX, double maxX)
 
void drawYLabels (Map< Integer, List< Double >> allYLabels, Canvas canvas, Paint paint, int maxScaleNumber, int left, int right, int bottom, double[] yPixelsPerUnit, double[] minY)
 
void drawXTextLabels (Double[] xTextLabelLocations, Canvas canvas, Paint paint, boolean showLabels, int left, int top, int bottom, double xPixelsPerUnit, double minX, double maxX)
 
abstract ClickableArea[] clickableAreasForPoints (float[] points, double[] values, float yAxisValue, int seriesIndex, int startIndex)
 
boolean isRenderNullValues ()
 
- Protected 成员函数 继承自 com.ab.view.chart.AbstractChart
void drawBackground (DefaultRenderer renderer, Canvas canvas, int x, int y, int width, int height, Paint paint, boolean newColor, int color)
 
int drawLegend (Canvas canvas, DefaultRenderer renderer, String[] titles, int left, int right, int y, int width, int height, int legendSize, Paint paint, boolean calculate)
 
void drawString (Canvas canvas, String text, float x, float y, Paint paint)
 
boolean getExceed (float currentWidth, DefaultRenderer renderer, int right, int width)
 
String getLabel (double label)
 
void drawPath (Canvas canvas, float[] points, Paint paint, boolean circular)
 
int getLegendSize (DefaultRenderer renderer, int defaultHeight, float extraHeight)
 
void drawLabel (Canvas canvas, String labelText, DefaultRenderer renderer, List< RectF > prevLabelsBounds, int centerX, int centerY, float shortRadius, float longRadius, float currentAngle, float angle, int left, int right, int color, Paint paint, boolean line)
 

Protected 属性

Type mType = Type.DEFAULT
 
- Protected 属性 继承自 com.ab.view.chart.XYChart
XYMultipleSeriesDataset mDataset
 
XYMultipleSeriesRenderer mRenderer
 

包函数

 BarChart ()
 
 BarChart (Type type)
 

Private 成员函数

void drawBar (Canvas canvas, float xMin, float yMin, float xMax, float yMax, int scale, int seriesIndex, Paint paint)
 
int getGradientPartialColor (int minColor, int maxColor, float fraction)
 

静态 Private 属性

static final int SHAPE_WIDTH = 12
 

详细描述

The bar chart rendering class.

构造及析构函数说明

com.ab.view.chart.BarChart.BarChart ( )
inlinepackage

Instantiates a new bar chart.

com.ab.view.chart.BarChart.BarChart ( Type  type)
inlinepackage

Instantiates a new bar chart.

参数
typethe type
com.ab.view.chart.BarChart.BarChart ( XYMultipleSeriesDataset  dataset,
XYMultipleSeriesRenderer  renderer,
Type  type 
)
inline

Builds a new bar chart instance.

参数
datasetthe multiple series dataset
rendererthe multiple series renderer
typethe bar chart type

成员函数说明

ClickableArea [] com.ab.view.chart.BarChart.clickableAreasForPoints ( float[]  points,
double[]  values,
float  yAxisValue,
int  seriesIndex,
int  startIndex 
)
inlineprotected

描述:TODO.

版本
v1.0
参数
pointsthe points
valuesthe values
yAxisValuethe y axis value
seriesIndexthe series index
startIndexthe start index
返回
the clickable area[]
参见
com.ab.view.chart.XYChart::clickableAreasForPoints(float[], double[], float, int, int)
作者
: amsoft.cn
日期
:2013-6-17 上午9:04:48
void com.ab.view.chart.BarChart.drawBar ( Canvas  canvas,
float  xMin,
float  yMin,
float  xMax,
float  yMax,
float  halfDiffX,
int  seriesNr,
int  seriesIndex,
Paint  paint 
)
inlineprotected

Draws a bar.

参数
canvasthe canvas
xMinthe X axis minimum
yMinthe Y axis minimum
xMaxthe X axis maximum
yMaxthe Y axis maximum
halfDiffXhalf the size of a bar
seriesNrthe total number of series
seriesIndexthe current series index
paintthe paint
void com.ab.view.chart.BarChart.drawBar ( Canvas  canvas,
float  xMin,
float  yMin,
float  xMax,
float  yMax,
int  scale,
int  seriesIndex,
Paint  paint 
)
inlineprivate

Draws a bar.

参数
canvasthe canvas
xMinthe X axis minimum
yMinthe Y axis minimum
xMaxthe X axis maximum
yMaxthe Y axis maximum
scalethe scale index
seriesIndexthe current series index
paintthe paint
void com.ab.view.chart.BarChart.drawChartValuesText ( Canvas  canvas,
XYSeries  series,
SimpleSeriesRenderer  renderer,
Paint  paint,
float[]  points,
int  seriesIndex,
int  startIndex 
)
inlineprotected

The graphical representation of the series values as text.

参数
canvasthe canvas to paint to
seriesthe series to be painted
rendererthe series renderer
paintthe paint to be used for drawing
pointsthe array of points to be used for drawing the series
seriesIndexthe index of the series currently being drawn
startIndexthe start index of the rendering points
void com.ab.view.chart.BarChart.drawLegendShape ( Canvas  canvas,
SimpleSeriesRenderer  renderer,
float  x,
float  y,
int  seriesIndex,
Paint  paint 
)
inline

The graphical representation of the legend shape.

参数
canvasthe canvas to paint to
rendererthe series renderer
xthe x value of the point the shape should be drawn at
ythe y value of the point the shape should be drawn at
seriesIndexthe series index
paintthe paint to be used for drawing
void com.ab.view.chart.BarChart.drawSeries ( Canvas  canvas,
Paint  paint,
float[]  points,
int[]  colors,
SimpleSeriesRenderer  seriesRenderer,
float  yAxisValue,
int  seriesIndex,
int  startIndex 
)
inline

The graphical representation of a series.

参数
canvasthe canvas to paint to
paintthe paint to be used for drawing
pointsthe array of points to be used for drawing the series
colors每个点的颜色
seriesRendererthe series renderer
yAxisValuethe minimum value of the y axis
seriesIndexthe index of the series currently being drawn
startIndexthe start index of the rendering points
String com.ab.view.chart.BarChart.getChartType ( )
inline

Returns the chart type identifier.

返回
the chart type
float com.ab.view.chart.BarChart.getCoeficient ( )
inlineprotected

Returns the value of a constant used to calculate the half-distance.

返回
the constant value
double com.ab.view.chart.BarChart.getDefaultMinimum ( )
inline

Returns the default axis minimum.

返回
the default axis minimum
int com.ab.view.chart.BarChart.getGradientPartialColor ( int  minColor,
int  maxColor,
float  fraction 
)
inlineprivate

Gets the gradient partial color.

参数
minColorthe min color
maxColorthe max color
fractionthe fraction
返回
the gradient partial color
float com.ab.view.chart.BarChart.getHalfDiffX ( float[]  points,
int  length,
int  seriesNr 
)
inlineprotected

Calculates and returns the half-distance in the graphical representation of 2 consecutive points.

参数
pointsthe points
lengththe points length
seriesNrthe series number
返回
the calculated half-distance value
int com.ab.view.chart.BarChart.getLegendShapeWidth ( int  seriesIndex)
inline

Returns the legend shape width.

参数
seriesIndexthe series index
返回
the legend shape width
boolean com.ab.view.chart.BarChart.isRenderNullValues ( )
inlineprotected

Returns if the chart should display the null values.

返回
if null values should be rendered

类成员变量说明

Type com.ab.view.chart.BarChart.mType = Type.DEFAULT
protected

The chart type.

final int com.ab.view.chart.BarChart.SHAPE_WIDTH = 12
staticprivate

The legend shape width.

final String com.ab.view.chart.BarChart.TYPE = "Bar"
static

The constant to identify this chart type.


该类的文档由以下文件生成: