I am using Android Plot(http://androidplot.com/) library to draw a Pie chart and Pie chart draw is fine but I want legend and its customisation as shown in attached image so please guide me to do same in Android Plot library.
Asked
Active
Viewed 1,830 times
1
-
MPA Chart library best for pie chart – Darshan Kachhadiya Jul 10 '17 at 14:01
-
@DarshanKachhadiya: I want to generate same graphs as like in IOS graph library "core plot" and all other are working fine in android plot. – Hitesh Bhalala Jul 10 '17 at 14:04
1 Answers
1
Pie chart legends were added in Androidplot 1.5.0 but is disabled by default. To enable:
pieChart.legend.setVisible(true);
Configuration of the legend works the same way it does for other series types in Androidplot. For example, you can configure a single column with 4 rows:
pie.getLegend().setTableModel(new DynamicTableModel(1, 4));
Or a single row with 4 columns (shown below):
pie.getLegend().setTableModel(new DynamicTableModel(4, 1));

Nick
- 8,181
- 4
- 38
- 63