fair-acc / chart-fx

A scientific charting library focused on performance optimised real-time data visualisation at 25 Hz update rates for data sets with a few 10 thousand up to 5 million data points.
GNU Lesser General Public License v3.0
508 stars 94 forks source link

The Zoomer plugin has some problems when using the mouse wheel #636

Open ichaus-we opened 1 year ago

ichaus-we commented 1 year ago

I noticed some problems with the Zoomer plugin when using the mouse-wheel.

All of these can be reproduced with the ZoomerSample and chart-fx 11.3.0. I uploaded some desktop videos (with audio).

Note: If using the mouse-wheel to zoom, the point under the mouse-pointer should not move but be the center of the zoom operation.

Issues: ~~1. On the first mouse-wheel action, the graph jumps vertically. Expected behaviour would be that the point under the mouse-pointer stays where it is, as it is the case for follow-up mouse wheel action, as well as it is the case for the horizontal axis. Seems to be related to issue #508.~~ Fixed with #660

https://github.com/fair-acc/chart-fx/assets/64585037/2701d0ce-a0ae-4e89-9519-6c3eadf6bc65

  1. If limiting zooming to one axis, then zooming with the mouse wheel, then limiting to the other axis (without a reset-to-origin), and then turning the mouse wheel, it will result in panning instead of zooming. I noticed that auto-ranging is turned off after mouse wheel action, only if the zoom stack is empty (like after reset-to-origin). Expected behaviour would be to always turn off auto-ranging after a mouse wheel action, after constraining zoom to that axis

https://github.com/fair-acc/chart-fx/assets/64585037/d3384dbd-fe06-4ae9-9027-4191cee6a690

  1. If the mouse wheel is operated quickly, the point under the mouse-pointer moves away but it should not.

https://github.com/fair-acc/chart-fx/assets/64585037/a3d0ae18-6931-4c5e-a854-b3777e65cc44

  1. After some zooming like for issue 2, zoom-to-origin will not reset the zoom state correctly.

https://github.com/fair-acc/chart-fx/assets/64585037/d01edb13-29f2-4f1d-94ac-32393cde7ea7

Hopefully these issues can get fixed easily.

Greetings, Markus

wirew0rm commented 1 year ago

Thank you for the very detailed reports, that will help a lot with reproducing and fixing the issues:+1:. I'll try to follow this up, but it might take me a while to find the time to dig into this.

ichaus-we commented 8 months ago

Update; Release 11.3.1 with #660 fixes sub-issue 1 of this issue ('On the first mouse-wheel action, the graph jumps vertically'). Still open are issues 2, 3 and 4.