Label overlapping in a Pie

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
albamati
Posts: 7
Joined: Thu Jul 13, 2006 3:40 pm

Label overlapping in a Pie

Post by albamati » Thu Jul 20, 2006 4:31 pm

I have a Pie, with a lot of label (eleven). They overlap.
Is there a method to adjust the label position?

I found PieLabelDistributor, but I suppose it is not the right class.

Thanks
AA

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 » Thu Jul 20, 2006 5:34 pm

For now, all you can do is:

(1) Change the start angle for the pie plot (setStartAngle()) to try to get the labels more evenly distributed on both sides of the plot;

(2) Eliminate some of the smaller sections in the plot - see DatasetUtilities.createConsolidatedPieDataset()).

At some point, I'll try to improve the labelling code to fit even more labels in.
David Gilbert
JFreeChart Project Leader

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

albamati
Posts: 7
Joined: Thu Jul 13, 2006 3:40 pm

It works!!!!!!!!!!!!!!

Post by albamati » Thu Jul 20, 2006 6:22 pm

Thanks a lot!
A simple rotation solved the problem!

Bye,
AA

Locked