这是我用于图表的代码 - 它没有正确显示:
RectF rectf = new RectF (10, 10, 200, 200);
Paint paint = new Paint();
for(int i=0;i<list.length;i++) {
if (i == 0) {
paint.setColor(COLORS[i]);
canvas.drawArc(rectf, 0, list_degree[i], true, paint);
} else {
paint.setColor(COLORS[i]);
canvas.drawArc(rectf, (list_degree[i-1]), (list_degree[i]), true, paint);
}
}
答案 0 :(得分:0)
可能你应该尝试一些图表库,它们会给你一个很好看的图表,如achartengine,flot graph等