问题
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