Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Honor zoom.mode (xy/x/y) when applying zoom.threshold. Don't trigger zoom outside the area of chart lines/bars. #352

Closed
wants to merge 5 commits into from

Conversation

ikkala
Copy link

@ikkala ikkala commented May 7, 2020

  1. Enhances Minimal step for "drag to zoom" on time chart #317

I had case where options.zoom.mode was set to 'x' and threshold was set. The mouse dragging vertically was still triggering the zoom, even without exceeding the threshold.

  1. Don't trigger zoom outside the area of chart lines/bars

If user starts mouse down for example in area of legends or axis the zoom starts. This fix limits the starting of zooming to the area of the actual graph.

Fixes #256

Tuukka Ikkala added 2 commits May 8, 2020 00:06
If user starts mouse down for example in area of legends or axis the zoom starts. This fix limits the starting of zooming to the area of the actual graph.

Fixes chartjs#256
@ikkala ikkala changed the title Fix: Honor zoom.mode (xy/x/y) when applying zoom.threshold Fix: Honor zoom.mode (xy/x/y) when applying zoom.threshold. Don't trigger zoom outside the area of chart lines/bars. May 7, 2020
@ikkala
Copy link
Author

ikkala commented May 7, 2020

Sorry, didn't mean to include the commit 8c0b0d3 (0.7.8: Patched 0.7.7) here into pull request -- it was only for internal testing.

@matcho
Copy link
Contributor

matcho commented May 11, 2020

Great news ! Thank you.

Copy link
Member

@kurkle kurkle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would collide with the overScaleMode, so would be best to add an option for the area limiting.

Needs a rebase.

@kurkle kurkle closed this May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zoom triggered when hiding/showing series by clicking legend
3 participants