chartjs-plugin-zoom icon indicating copy to clipboard operation
chartjs-plugin-zoom copied to clipboard

PR Interest Inquiry: Mouse click zooming & double click zoom reset

Open hokiedsp opened this issue 5 years ago • 4 comments

Hi,

I added a couple features to my fork, and I'm posting this to offer PRs of them if there is an interest:

  • Zooming by mouse click : Mouse click to trigger zooming action at current pointer location. Zoom direction (in/out) is configurable via options. Control-click reverses the default direction. (obviously not to be used with panning)
  • Zoom resetting by mouse double click: Mouse double click to call the resetZoom() function.

Both actions can be enabled/disabled via options "zoom.click" and "zoom.dblclick" fields. When both are disabled, zoom behavior is unaltered from the original.

I can raise PRs individually or both together if there is an interest. If so, please let me know what needs to be included (beyond edited source).

Thanks, Kesh

hokiedsp avatar Oct 21 '19 21:10 hokiedsp

Hi! I didn't met this use case personally, but that sounds interesting.

jledentu avatar Nov 05 '19 09:11 jledentu

Yes please.

alfabetagama avatar Nov 14 '20 17:11 alfabetagama

That would be awesome

mluksic-paztir avatar Nov 15 '20 11:11 mluksic-paztir

This will be an helpful feature to reset the charts after zooming

sanjeeviraj avatar Aug 27 '21 17:08 sanjeeviraj