Hi,
I am using JFreeChart with XYPlot with a NumberAxis on both X and Y axes.
Using the JavaFX ChartViewer, when I click on the Y axis it seems to do full zoom out (set auto range to both axes). Clicking on the X axis has no effect. AFAIK clicking on any axis had no effect in the Swing version.
I think it would be great to add a default handler that would set the auto range to each axis (separately) when the user clicks on the axis.
Mouse click handler for axes
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: Mouse click handler for axes
I hadn't noticed this behaviour before. It looks like a bug...but I agree with you that it would be useful to enable some kind of mouse interaction directly on the axes. Not sure I'll get anything done for the upcoming release (other than fixing this bug) but I'll keep the feature in mind.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Re: Mouse click handler for axes
I tried to implement the function myself.
See https://github.com/jfree/jfreechart/pull/6
See https://github.com/jfree/jfreechart/pull/6