/**
* The graphical representation of a series.
*
* @param canvas the canvas to paint to
* @param paint the paint to be used for drawing
* @param points the array of points to be used for drawing the series
* @param seriesRenderer the series renderer
* @param yAxisValue the minimum value of the y axis
* @param seriesIndex the index of the series currently being drawn
* @param startIndex the start index of the rendering points
*/
@Override
public void drawSeries(Canvas canvas, Paint paint, List<Float> points,
XYSeriesRenderer seriesRenderer, float yAxisValue, int seriesIndex, int startIndex) {
int seriesNr = mDataset.getSeriesCount();
int length = points.size();
paint.setColor(seriesRenderer.getColor());
paint.setStyle(Style.FILL);
float halfDiffX = getHalfDiffX(points, length, seriesNr);
int start = 0;
if (startIndex > 0) {
start = 2;
}
for (int i = start; i < length; i += 4) {
if (points.size() > i + 3) {
float xMin = points.get(i);
float yMin = points.get(i + 1);
// xMin = xMax
float xMax = points.get(i + 2);
float yMax = points.get(i + 3);
drawBar(canvas, xMin, yMin, xMax, yMax, halfDiffX, seriesNr, seriesIndex, paint);
}
}
paint.setColor(seriesRenderer.getColor());
}
RangeBarChart.java 文件源码
java
阅读 37
收藏 0
点赞 0
评论 0
项目:buildAPKsApps
作者:
评论列表
文章目录