开发者

Pie Chart Drawing in Android [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_如何学编程 Closed 11 years ago.

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜