Annotation on CombinedXYPlot

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

Annotation on CombinedXYPlot

Post by Bjarni » Thu Nov 07, 2002 4:05 pm

Hi there .. I'm trying to add annotatioin to a CombinedXYPlot but it doesn't display it .....

plot.addAnnotation(new XYTextAnnotation("asdf",java.awt.Font.getFont("Arial"),Color.blue, 2.0, 2.0));

shouldn't this be enough ... or ???

regards
Bjarni

Dave Gilbert

Re: Annotation on CombinedXYPlot

Post by Dave Gilbert » Fri Nov 08, 2002 12:28 am

Hi Bjarni,

I suspect that won't work because the CombinedXYPlot only has one axis, so it won't know where to display the annotation. You'll need to add the annotation to one of the subplots.

I should override the addAnnotation method in the CombinedXYPlot class and have it throw an "operation not supported" exception.

Regards,

DG.

Locked