Ensuring Annotations are visible

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
FunkyELF
Posts: 11
Joined: Wed Nov 29, 2006 3:48 pm

Ensuring Annotations are visible

Post by FunkyELF » Thu Nov 30, 2006 4:15 pm

Has anyone had to deal with annotations that should remain visible after the chart is zoomed in?

I am trying to develop an application that plots some data and finds some points of interest (zeros that meet certain requirements). I want those values to be displayed on the plot. I have got this far. Now the problem is that some of the zeros are too close together and the text overlaps. I can zoom in so that the zeros appear farther apart but if I zoom in and don't go around the original annotation, it will disappear.

Is there a way to move an annotation when the chart is zoomed based on the range of the new window?

michael75
Posts: 16
Joined: Thu Sep 15, 2005 4:42 pm

Post by michael75 » Thu Nov 30, 2006 5:24 pm

Once I needed a way to fetch more detailed data from a remote resource when the chart is zoomed. For this I derived from XYPlot and implemented the data request in the zoom*Axes methods. The annotations have funtions to set x and y positions. Maybe you can meet your requirement this way, too.

Locked