JFreeChartDemo null legend causes problems

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

JFreeChartDemo null legend causes problems

Post by Scarlett » Thu Feb 15, 2001 11:24 pm

I was using a modified JFreeChartDemo class for my project. When I
set the legend to be null (chart.setLegend(null);) I received a run time error when I accessed Edit -> Chart Properties.

The error occurs in class LegendPropertyEditPanel. This class is attempting to access 5 variables from the legend which of course it can't since it is null. I fixed the problem with an if ... else clause and created the five variables if the legend is == null. Has anyone else run into this problem? The error also occurs in JFreeChartDemo if the legend is set to null.

David Gilbert

RE: JFreeChartDemo null legend causes problems

Post by David Gilbert » Sun Feb 18, 2001 7:18 am

Thanks for the feedback. I've registered the bug on SourceForge (id = 132915) so I don't forget about it. The fix should be included in the next version.

Regards,

DG.

Locked