Pie Chart Drawing in Android [closed]
This is the code I have used for the chart - it is not displaying properly:
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);
}
}
May be you should try some charting libraries which will give you a Nice look of Charts something like achartengine,flot graph etc
精彩评论