Draw multiple pie charts in Activity of Android

时光怂恿深爱的人放手 提交于 2019-12-12 02:09:22

问题


Now I'm doing a project which need draw multiple pie charts with text. Can anyone give me some ideas, I use a ListView or loop TextView to achieve this. And, how can I have multiple canvases in one Activity.

Cheers!!

multiple pie charts with text


回答1:


You can create a custom view which draws the pie chart. And create a layout which holds the pie chart view and textviews. Use this layout for the row layout of listview.

If you need help drawing piechart, this will give an idea

https://github.com/blessenm/PieChartDemo




回答2:


I am using google chart apis for this purpose.

http://code.google.com/apis/chart/image/docs/gallery/pie_charts.html

Build your URL with values and use a Webview to show the chart.

Note: Internet connectivity is a must for this.




回答3:


You can do this with ListView. You will have to define custom layout for list entries (containig drawing space for pie chart), and adapter taking care of drawing proper pie charts in them. Keep in mind that iews could be reused.




回答4:


Instead of using adapter just inflate the charts in your layout and manage it according to your its helpfull for me I am using Shinobi chart



来源:https://stackoverflow.com/questions/8292754/draw-multiple-pie-charts-in-activity-of-android

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!