How to set different values for Legend and Labels in piechart While I am using Chart Engine in android

后端 未结 2 1279
梦毁少年i
梦毁少年i 2021-01-20 17:13

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

相关标签:
2条回答
  • 2021-01-20 17:27

    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.

    0 讨论(0)
  • 2021-01-20 17:47

    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.

    0 讨论(0)
提交回复
热议问题