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(bar-race): fix bug with animation #13121

Merged
merged 4 commits into from
Aug 14, 2020
Merged

fix(bar-race): fix bug with animation #13121

merged 4 commits into from
Aug 14, 2020

Conversation

Ovilia
Copy link
Contributor

@Ovilia Ovilia commented Aug 13, 2020

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Fix bug with bar race and move realtimeSort to be under series rather than axis and remove sort and sortSeriesIndex. The original bar race PR is #12484.

Fixed issues

Details

Before: What was the problem?

When there is currently an interchanging happening, calling setOption will make one frame with wrong bar widths (which is the target width after animation).

After: How is it fixed in this PR?

Instead of using during, this PR uses zr.on('rendered') so that sorting is done after a frame is rendered, rather than before. It can fix many other potential problems with bar race.

Usage

Are there any API changes?

  • The API has been changed.

Old:

yAxis: {
    sort: true,
    realtimeSort: true,
    sortSeriesIndex: 0,
    ...
},
series: [{
    ...
}]

New:

yAxis: {
    ...
},
series: [{
    realtimeSort: true,
    ...
}]

Related test cases or examples to use the new APIs

NA.

Others

Merging options

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

Other information

@Ovilia Ovilia merged commit 0e882aa into next Aug 14, 2020
@echarts-bot
Copy link

echarts-bot bot commented Aug 14, 2020

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

@Ovilia Ovilia deleted the bar-race branch August 14, 2020 09:19
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