echarts icon indicating copy to clipboard operation
echarts copied to clipboard

fix(Datazoom): sideway scrolling & zooming disproportion

Open kevinz-isentia opened this issue 1 year ago • 3 comments

Brief Information

This pull request is in the type of:

  • [x] 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.

  • [x] 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

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

kevinz-isentia avatar Jul 08 '24 04:07 kevinz-isentia

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.

echarts-bot[bot] avatar Jul 08 '24 04:07 echarts-bot[bot]

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

github-actions[bot] avatar Jul 18 '24 03:07 github-actions[bot]

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

kevinz-isentia avatar Sep 03 '24 05:09 kevinz-isentia