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(Datazoom): sideway scrolling & zooming disproportion #20124

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

Conversation

kevinz-isentia
Copy link

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

This PR fixes some zoom issues in DataZoom

Fixed issues

  • Fixed sideway scrolling when reaching max or min span in DataZoom
  • Fixed zooming disproportion in DataZoom if there is more than one axis (keep the same ratio for x and y axis)

Details

Before: What was the problem?

  1. When using mouse wheel to zoom in/out, it will start sideway scrolling when it reaches the max/min span.
    zoom in out before

  2. Sometimes on zoom out, the zoom ration will become inconsistent and causing a disproportional view.

before

After: How does it behave after the fixing?

  1. Fixed effect: it will stop at the max/min span
    zoom in out after

  2. Fixed effect: Two axes keep the same ratio

after

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.

* Fixed sideway scrolling when reaching max or min span in DataZoom

* Fixed zooming disproportion in DataZoom if there is more than one axis
Copy link

echarts-bot bot commented Jul 8, 2024

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.

@kevinz-isentia kevinz-isentia changed the title Datazoom fixes (#3) fix(Datazoom): sideway scrolling & zooming disproportion Jul 8, 2024
Copy link
Contributor

The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-20124@d08b02b

Copy link
Contributor

@Ovilia Ovilia left a comment

Choose a reason for hiding this comment

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

Can you help provide a way to reproduce the situation when disproportion happens?

@kevinz-isentia
Copy link
Author

kevinz-isentia commented Sep 3, 2024

Hi @Ovilia , sorry for the late reply.

It's how to reproduce: When you zoom in, drag the view over to a side and zoom out, if a side touches the boundary faster than another, it will happen. It's subtle but it does happen.
Our PM was unhappy about the result so we have to use our custom code base. I really hope it can be merged so we can come back to the office release branch.

Cheers,
Kevin

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.

2 participants