Hello,
I created a TimeSeries chart using ChartComposite. I set setVerticalAxisTrace(true) to show the traceline in the chart. How can I get the position of the traceline while moving the mouse ?
Thanks for your help.
How to show the position when using traceline
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
When you say "the position of the traceline", I'm guessing you mean the corresponding data value along the axis? I'm not 100% sure how to derive it for the ChartComposite, but for ChartPanel it is slightly involved since you have to take into account the data area rectangle and any scaling that has been applied by the panel. MouseListenerDemo4.java shows how to do it (but, as I said, for a ChartPanel rather than a ChartComposite).
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

