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(animation): fix incorrect dataGroupId for old data items in universalTransition #17559

Merged
merged 1 commit into from
Oct 15, 2022

Conversation

tyn1998
Copy link
Contributor

@tyn1998 tyn1998 commented Aug 23, 2022

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

dataGroupId for old data items in universalTransition is mistakenly set to that of new data items, not the expected old one. So fix it.

Fixed issues

Details

Before: What was the problem?

const dataGroupId = data.hostModel && (data.hostModel as SeriesModel).get('dataGroupId') as string;

When processing old data items, after executing this line, dataGroupId is wrongly assigned a value that is belong to new data items. That will cause universalTransition not work if we fall back to depend on dataGroupId to decide dataItem's key.

After: How does it behave after the fixing?

By storing the old dataGroupId in globalStore, now the correct old dataGroupId can be accessed!

Document Info

One of the following should be checked.

I think the example should be updated with dataGroupId in series field.

image

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

Thanks for @pissang's instruction!

@echarts-bot echarts-bot bot added PR: awaiting doc Document changes is required for this PR. PR: awaiting review labels Aug 23, 2022
@echarts-bot
Copy link

echarts-bot bot commented Aug 23, 2022

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.

Document changes are required in this PR. Please also make a PR to apache/echarts-doc for document changes and update the issue id in the PR description. When the doc PR is merged, the maintainers will remove the PR: awaiting doc label.

@pissang pissang merged commit 069b692 into apache:master Oct 15, 2022
@echarts-bot
Copy link

echarts-bot bot commented Oct 15, 2022

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

@plainheart plainheart changed the title fix: incorrect dataGroupId for old data items in universalTransition fix(animation): fix incorrect dataGroupId for old data items in universalTransition Nov 30, 2022
@plainheart plainheart changed the title fix(animation): fix incorrect dataGroupId for old data items in universalTransition fix(animation): fix incorrect dataGroupId for old data items in universalTransition Nov 30, 2022
@echarts-bot echarts-bot bot added PR: doc ready and removed PR: awaiting doc Document changes is required for this PR. labels Dec 1, 2022
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.

[Bug] incorrect dataGroupId for old data items in universalTransition
2 participants