chartjs / chartjs-plugin-zoom

Zoom and pan plugin for Chart.js
MIT License
579 stars 322 forks source link

New zoom mode that scales horizontally and vertically on mouse movement #781

Open kangalio opened 9 months ago

kangalio commented 9 months ago

I'm considering porting an Python pyqtgraph application to JavaScript using Chart.js. Pyqtgraph supports not just panning with the left mouse button and zooming with the mouse wheel, but also scaling horizontally and vertically with the right mouse button (link). This turns out to be really intuitive and fast for exploring the data in my application.

Could this feature be added to Chart.js's zoom plugin too?

Instead of right-click dragging, we'd probably have left-click + modifier key dragging, since Hammer.js apparently doesn't support right-click dragging, and also since it fits in better with the existing mouse interactions in this plugin.

The options entry could be called scale

Would such a PR be accepted?