Superposed labels

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
cristina
Posts: 6
Joined: Fri Oct 22, 2004 6:14 pm

Superposed labels

Post by cristina » Mon Feb 21, 2005 1:13 pm

I have a piechart with aprox. 15 labels, but these turn out to be superposed: how can I solve it?

Thank you
Cristina

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Mon Feb 21, 2005 1:34 pm

Make sure you are using a recent release of JFreeChart, the pie labelling is much better than it was. If that doesn't help, then you'll need to look at consolidating some of the items in your dataset - you can either do that in your own code or make use of the limitPieDataset() method in the DatasetUtilities class.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

cristina
Posts: 6
Joined: Fri Oct 22, 2004 6:14 pm

Post by cristina » Mon Feb 21, 2005 2:16 pm

Thank you for your help. The version that I am using is 0.9.21: is there newer anyone?

Actually I am implementing a MultiplePieChart, with DefaultCategoryDataset

I cannot apply the method that you say to me, it gives me ClassCastException

thank you very much again

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Mon Feb 21, 2005 10:43 pm

In the multi pie plot, there is less room for labels. Also, this class uses a CategoryDataset as its source of data, so you have less scope to consolidate small value items (it could be done, but you'd need to write the code yourself to handle this).
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked