chartjs / chartjs/chartjs-plugin-zoom

New zoom mode that scales horizontally and vertically on mouse movement

Open
#781 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
623
Forks
331
Avg merge
7h 5m
Merged PRs (30d)
7

Description

I'm considering porting an Python [pyqtgraph](https://pyqtgraph.org) 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](https://pyqtgraph.readthedocs.io/en/latest/user_guide/mouse_interaction.html#d-graphics)). 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?

Contributor guide

Open the contributing guide

Research direction

The issue does not name repository files or tests. Start by reviewing the plugin's existing mouse interactions and options, then compare them with the linked pyqtgraph behavior and the current Chart.js zoom plugin. Done would mean a defined modifier-key drag mode that scales horizontally and vertically without conflicting with existing pan and wheel-zoom interactions.

Written by the indexing model from the issue text.

Assessment

Tech stack
chart.js, javascript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.