Is there a way to tie the arrow keys to iterate through graph plots?
Similar to the side effect of the slider in 'Crosshair Demo 1'.
I could just use the slider, but I'm having a hard time figuring out how to find out what item in the dataset I've selected. The slider is tied to the dataset.getItemCount(0). The slider doesn't get updated by clicking on the graph.
Any help would be much appreciated!
XYPlot click event & key events
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
It's not something that is implemented specifically. Swing is pretty flexible, though, so I'm sure there would be some way to capture the key events for the ChartPanel and wire them up to update the cross-hairs in the chart.
It wouldn't be that hard to update the slider in the demo you mentioned - the table gets updated after a click on the chart, it would be simple to add one or two lines to update the slider value as well...I should probably make that change.
It wouldn't be that hard to update the slider in the demo you mentioned - the table gets updated after a click on the chart, it would be simple to add one or two lines to update the slider value as well...I should probably make that change.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

