Hi,
I have a dataset which is a TimeSeriesCollection. I have a crosshair which locks on the nearest point (another nice thing of this powerful lib).
After the ChartProgressListener finish drawing I would like to know on which serie is crosshair lock ?
I know I can use the getDomainCrosshairValue() and getRangeCrosshairValue to get the crossHair coordinates and then go through my internal data and find the good serie, but it seems a little overkill if the serie is already known.
Is there a fast way to get the serie index ?
CrossHair and multiple timeSeries
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Unfortunately, no dataset or series index info is retained, so there isn't an easy way to access it. That's an oversight, but unfortunately fixing the problem looks like a big chunk of work.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
Simple algorithm/patch/source code available at following link:
http://www.jfree.org/phpBB2/viewtopic.php?p=64888#64888
http://www.jfree.org/phpBB2/viewtopic.php?p=64888#64888