Hi All,
When I add an XYBoxAnnotation to an XYPlot I can no longer access any data points which happen to be drawn within the same area, the XYBoxAnnotation seems to be drawn ontop of the data points. As I still need the mouse to be able to highlight and select these points I would like a method to be able to send the XYBoxAnnotation to the back (or something similiar) so that the data points remain in a state where I can still select them. Or is there a completely different way in which I can occomplish this?
Thanks in advance for your help.
Snoopygee
Can't access XYPlot data point behind XYBoxAnnotation
Re: Can't access XYPlot data point behind XYBoxAnnotation
OK seems as though I have found the solution.
Rather than using Annotations I can use a Domain Marker. This allows be to enforce a layer order so that the points appear above the Marker and remain selectable.
Cheers
Snoopygee
Rather than using Annotations I can use a Domain Marker. This allows be to enforce a layer order so that the points appear above the Marker and remain selectable.
Cheers
Snoopygee
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: Can't access XYPlot data point behind XYBoxAnnotation
If you add an annotation to the plot, it will be rendered against the primary axes and "above" the plot. As an alternative, you can add the annotation to a specific renderer, and then the annotation will be rendered using the axes that the renderer uses, and you have the option of specifying whether the annotation is rendered in a layer above or below the data points.
That said, I should probably introduce the layer option to the plot annotations as well.
That said, I should probably introduce the layer option to the plot annotations as well.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

