Skip to content

fix(dataZoom): fix dataZoom for single data #21043

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

Merged
merged 2 commits into from
Jun 19, 2025
Merged

fix(dataZoom): fix dataZoom for single data #21043

merged 2 commits into from
Jun 19, 2025

Conversation

Ovilia
Copy link
Contributor

@Ovilia Ovilia commented Jun 19, 2025

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

#16978 brings a bug for single data with dataZoom, where data.count() is 1 and const step = thisShadowExtent[1] / (data.count() - 1); being Infinity and the dataZoom is displayed at an unexpected position.

Fixed issues

Details

Before: What was the problem?

DataZoom is displayed at an unexpected position.

After: How does it behave after the fixing?

DataZoom is displayed at the same position as 5.6.0

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

TODO: axes other than time axes still have the problem of being not the same as the data shape, which should be improved in future versions.

@Ovilia Ovilia added this to the 6.0.0 milestone Jun 19, 2025
Copy link
Contributor

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

@Ovilia Ovilia merged commit 5d66452 into v6 Jun 19, 2025
2 checks passed
Copy link

echarts-bot bot commented Jun 19, 2025

Congratulations! Your PR has been merged. Thanks for your contribution! 👍

@Ovilia Ovilia deleted the fix-dataZoom branch June 19, 2025 06:44
@Ovilia Ovilia added PR: doc unchanged PR: supplementary Fix bugs or enhance a feature introduced in this version, which should ignore in the release note. labels Jun 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: doc unchanged PR: supplementary Fix bugs or enhance a feature introduced in this version, which should ignore in the release note. size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants