bugs in PiePlot.java

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

bugs in PiePlot.java

Post by Mathias Haushofer » Tue Feb 25, 2003 2:49 pm

i found two bugs in PiePlot.java:
(in jfreechart-0.9.6)

1. line 560:
double[] newExplodePercentages = new double[section];
should be
double[] newExplodePercentages = new double[section + 1];

otherwise sometimes ArrayOutOfBoundsExceptions occur after calling setExplodePercent()


2. line 998 should read:
result = this.defaultOutlinePaint;
it is simply commented out in the original PiePlot.java, which prevents setDefaultOutlinePaint() to work

David Gilbert

Re: bugs in PiePlot.java

Post by David Gilbert » Wed Feb 26, 2003 12:47 am

Hi Mathias,

Thanks for the reports:

(1) Well spotted, I've fixed this now.

(2) Are you sure? In my code, this line is not commented out...and I double checked the CVS on SourceForge. Maybe I'm looking at the wrong thing...

Regards,

Dave Gilbert

Mathias Haushofer

Re: bugs in PiePlot.java

Post by Mathias Haushofer » Wed Feb 26, 2003 10:40 am

sorry about the second bug, i messed things up a bit...

in fact it is in PiePlot.java line 1378, which reads:
(in my downloaded version 0.9.6)

Paint outlinePaint = Color.lightGray; //getOutlinePaint(section);

keep up the good work (except for the bugs ;-)
mathias

Locked