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

feat: Add option to dataZoom to support nature move or smoothly move/scale when using track pad like on track pad of mac. #19352

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jianqi-jin
Copy link

Brief Information

Add option to dataZoom to support nature move or smoothly move/scale when using track pad like on track pad of mac.

This pull request is in the type of:

  • [ x] bug fixing
  • [ x] new feature
  • others

What does this PR do?

Add an option called natureMoveOnMouseWheel of dataZoom to support this feature.
When this option is set to true. The behavior of mac track pad on chart will act as on a normal page. Which means you can move up/down and zoom the chart in/out using two fingers!

Fixed issues

Details

Before: What was the problem?

We can't use the touchpad to move the dataZoom. We just can scale it. And I wish that we can use the touchpad to move the dataZoom window. Such as lots of software, they can use the touchpad to scroll x direction and y direction both.

After: How does it behave after the fixing?

You can see the test file in the test/gesture.html see the result.

176181799-6cc6732b-4e08-4c95-8557-0feb98ba874d.mov

Document Info

One of the following should be checked.

  • This PR doesn't relate to document changes
  • The document should be updated later
  • The document changes have been made in apache/echarts-doc#xxx

Misc

ZRender Changes

  • This PR depends on ZRender changes (ecomfe/zrender#xxx).

Related test cases or examples to use the new APIs

N.A.

Others

Merging options

  • Please squash the commits into a single one when merging.

Other information

Copy link

echarts-bot bot commented Dec 2, 2023

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

⚠️ MISSING DOCUMENT INFO: Please make sure one of the document options are checked in this PR's description. Search "Document Info" in the description of this PR. This should be done either by the author or the reviewers of the PR.

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.

1 participant