ticks or minus signs in pie percent label

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Janine

ticks or minus signs in pie percent label

Post by Janine » Fri Jun 28, 2002 3:40 pm

I just upgraded to 9.2 last night and I noticed that now my Pie plot which is set to print NAME_AND_PERCENT_LABELS has either ticks or minus signs in front of the percentage value (-1.0 %) instead of (1.0%) as it was in 9.1.
Does anyone know where I can turn these off?

David Gilbert

Re: ticks or minus signs in pie percent label

Post by David Gilbert » Sun Jun 30, 2002 8:23 pm

Thanks for reporting this, it is a bug introduced (by me) because now the segments in the pie chart can be drawn clockwise or anti-clockwise.

To fix it, in the drawLabel(...) method in the PiePlot class, you will see three instances of this code:

percentFormatter.format(extent/3.60)+"%";

Change each instance to:

percentFormatter.format(extent/3.60*this.direction)+"%";

Regards,

DG.

Locked