JFreechart support followings to panning and zoom-in the chart, it's hardcoded in ChartPanel:
- A rectangle can be created in the chart by mouse to zoom in.
- While the CTRL key is held, the diagram view can be panned with mouse click-and-hold in any direction
But, it make more sense for me that panning use the mouse only and zoom-in use the Mouse + CTRL, I want to support followings:
- While the CTRL key is held, a rectangle can be created by mouse to zoom in.
- The chart can be panned with mouse click-and-hold in any direction
Is there anyway to support my requirement in JFreeChart?
Thanks a lot!
How to panning chart using mouse and CTRL?
-
- Posts: 2
- Joined: Tue Jul 12, 2016 7:08 am
- antibot: No, of course not.
-
- Posts: 1634
- Joined: Sat Feb 17, 2007 1:51 pm
Re: How to panning chart using mouse and CTRL?
The behaviour is hardwired into the ChartPanel code. You can´t change that without changing the code and recomliing the package.
Alternatovely, you could have a look at the FSE (future state edition) of JFreeChart, where the handling of mouse event has been implemented in a much more flexible way.
Alternatovely, you could have a look at the FSE (future state edition) of JFreeChart, where the handling of mouse event has been implemented in a much more flexible way.