Trying to get XY-values next to the crosshair

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
DarkMark
Posts: 2
Joined: Thu Jun 14, 2007 10:26 am

Trying to get XY-values next to the crosshair

Post by DarkMark » Thu Jun 14, 2007 1:14 pm

Hi,

I'm using a DefaultXYDataset and XYPlot.
I'm also using a crosshair and I am able to query the X and Y values where the crosshair points at. But I'd also like to have the values in the near area around the crosshair, e.g. the XY directly before and after to calculate a gradiant.

How can I do this? It would be great if could query the series and the index in the series, but I can't find a way to do so.

wzwei28
Posts: 105
Joined: Wed Mar 16, 2005 9:17 am
Location: Malaysia, Earth
Contact:

Post by wzwei28 » Fri Oct 12, 2007 3:33 pm

Simple algorithm/patch/source code available at following link:
http://www.jfree.org/phpBB2/viewtopic.php?p=64888#64888

Locked