| AndBase开发框架 1.6

- 首页
- 相关页面
- 命名空间
- 类
- 文件

- 类列表
- 类索引
- 类继承关系
- 类成员

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

## 类
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 | ( |  | ) |
| inline package

Instantiates a new bar chart.

com.ab.view.chart.BarChart.BarChart | ( | Type | type | ) |
| inline package

Instantiates a new bar chart.

参数

  type | the type

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

Builds a new bar chart instance.

参数

  dataset | the multiple series dataset
  renderer | the multiple series renderer
  type | the bar chart type

## 成员函数说明

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

描述：TODO.

版本
  v1.0

参数

  points | the points
  values | the values
  yAxisValue | the y axis value
  seriesIndex | the series index
  startIndex | the 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
| ) |  |
| inline protected

Draws a bar.

参数

  canvas | the canvas
  xMin | the X axis minimum
  yMin | the Y axis minimum
  xMax | the X axis maximum
  yMax | the Y axis maximum
  halfDiffX | half the size of a bar
  seriesNr | the total number of series
  seriesIndex | the current series index
  paint | the paint

void com.ab.view.chart.BarChart.drawBar | ( | Canvas | canvas,
|  | float | xMin,
|  | float | yMin,
|  | float | xMax,
|  | float | yMax,
|  | int | scale,
|  | int | seriesIndex,
|  | Paint | paint
| ) |  |
| inline private

Draws a bar.

参数

  canvas | the canvas
  xMin | the X axis minimum
  yMin | the Y axis minimum
  xMax | the X axis maximum
  yMax | the Y axis maximum
  scale | the scale index
  seriesIndex | the current series index
  paint | the paint

void com.ab.view.chart.BarChart.drawChartValuesText | ( | Canvas | canvas,
|  | XYSeries | series,
|  | SimpleSeriesRenderer | renderer,
|  | Paint | paint,
|  | float[] | points,
|  | int | seriesIndex,
|  | int | startIndex
| ) |  |
| inline protected

The graphical representation of the series values as text.

参数

  canvas | the canvas to paint to
  series | the series to be painted
  renderer | the series renderer
  paint | the paint to be used for drawing
  points | the array of points to be used for drawing the series
  seriesIndex | the index of the series currently being drawn
  startIndex | the 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.

参数

  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

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.

参数

  canvas | the canvas to paint to
  paint | the paint to be used for drawing
  points | the array of points to be used for drawing the series
  colors | 每个点的颜色
  seriesRenderer | the series renderer
  yAxisValue | the minimum value of the y axis
  seriesIndex | the index of the series currently being drawn
  startIndex | the 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 | ( |  | ) |
| inline protected

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
| ) |  |
| inline private

Gets the gradient partial color.

参数

  minColor | the min color
  maxColor | the max color
  fraction | the fraction

返回
  the gradient partial color

float com.ab.view.chart.BarChart.getHalfDiffX | ( | float[] | points,
|  | int | length,
|  | int | seriesNr
| ) |  |
| inline protected

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

参数

  points | the points
  length | the points length
  seriesNr | the series number

返回
  the calculated half-distance value

int com.ab.view.chart.BarChart.getLegendShapeWidth | ( | int | seriesIndex | ) |
| inline

Returns the legend shape width.

参数

  seriesIndex | the series index

返回
  the legend shape width

boolean com.ab.view.chart.BarChart.isRenderNullValues | ( |  | ) |
| inline protected

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
| static private

The legend shape width.

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

The constant to identify this chart type.

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

- src/com/ab/view/chart/BarChart.java