chartjs / chartjs/chartjs-plugin-zoom

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

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

Description

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

Contributor guide

Open the contributing guide

Research direction

No file or test path is named. Start by locating the plugin's existing mouse, panning, zoom-option, and resetZoom entry points, then compare the fork's changes. Done means click zooming and double-click reset are independently configurable, with control-click direction reversal, while disabled options preserve existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.