问题
Hi I am using A chart Engine to display pie chart in android.In my code I want to show values on labels and area corresponding to that vale on legend.But I am unable to get that one.Please can any one helps to me.Thanks in advance.
I want like below
回答1:
Displaying the pie labels with separate values from the legend labels is not possible in AChartEngine.
However, you can display the pie slice value (age in your case) in the middle of each slice, using:
renderer.setDisplayChartValues(true);
There was a bug in the code that was preventing displaying the chart values when the labels were not displaying. I have just fixed this issue in SVN. You can checkout the code according to this page and run an ant dist
in order to build an up to date achartengine.jar file including this fix.
回答2:
I was also having the same problem but now its solved. Thanks dan...
You can use
renderer.setDisplayValues(true);
This displays the %of distribution in the pie chart itself.
来源:https://stackoverflow.com/questions/13657432/how-to-set-different-values-for-legend-and-labels-in-piechart-while-i-am-using-c