Annotations and Z-Order

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
dorseywright
Posts: 4
Joined: Tue Feb 05, 2008 5:41 pm

Annotations and Z-Order

Post by dorseywright » Thu Mar 19, 2009 10:33 pm

Is there a way to make annotations like XYLineAnnotation and XYShapeAnnotation show up behind the actual data series instead of in front of it? I'm using a Scatter Plot by the way.

Thanks!
Chuck

paradoxoff
Posts: 1634
Joined: Sat Feb 17, 2007 1:51 pm

Re: Annotations and Z-Order

Post by paradoxoff » Sun Mar 22, 2009 4:40 pm

You can add an XYAnnotation to an XYPlot and to a renderer. The XYItemRenderer interface declares the necessary methods. If you add an XYAnnotation to a renderer, you can specify a layer. For your case, Layer.BACKGROUND would be appropriate.

Locked