Pie chart section label position

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
vijoy
Posts: 1
Joined: Sat Apr 01, 2006 7:17 am

Pie chart section label position

Post by vijoy » Sat Apr 01, 2006 7:48 am

How can I make the pie chart section labels to be positioned adjacent to the section along the circumference of the pie without the label link and the label border showing ?

Do i have to sub-class PiePlot3D and override its draw() method in order to achieve this ?


Thanks,
Vijoy

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 Apr 03, 2006 11:27 am

Yes, you'll need to subclass. The original PiePlot implementation worked in the way you described, but it resulted in a lot of complaints about labels overlapping. The new code does a better (but not perfect) job of avoiding overlapping labels.
David Gilbert
JFreeChart Project Leader

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

arkadye
Posts: 9
Joined: Fri May 19, 2006 7:02 pm

Pie/Ring chart label links are too long.

Post by arkadye » Thu Jun 15, 2006 2:22 am

How can I make the pie/ring chart section label links to be shorter? I tried changing labelGap and labelLinkMargin attributes of the PiePlot/RingPlot but the changes did not have any effect on the link length. Right now the label links on my pie/ring chart inside JSP are too long and some of the labels are cropped because of that.

Thanks,
Arkady.

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 Jun 15, 2006 10:29 am

The labelGap setting should make some difference, but it is already quite a small gap (5% of the plot width). Can you post a screenshot?
David Gilbert
JFreeChart Project Leader

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

arkadye
Posts: 9
Joined: Fri May 19, 2006 7:02 pm

Pie/Ring chart label links are too long.

Post by arkadye » Thu Jun 15, 2006 9:21 pm

david.gilbert wrote:The labelGap setting should make some difference, but it is already quite a small gap (5% of the plot width). Can you post a screenshot?
Thanks, David. I think I figured out what the problem was. It's a combination of interiorGap and maximumLabelWidth settings.

Thanks again.

Locked