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

glitch when setOption() is called in fast succession #15154

Closed
tmtron opened this issue Jun 15, 2021 · 3 comments
Closed

glitch when setOption() is called in fast succession #15154

tmtron opened this issue Jun 15, 2021 · 3 comments
Labels
bug en This issue is in English priority: high
Milestone

Comments

@tmtron
Copy link

tmtron commented Jun 15, 2021

Version

5.2.1

Reproduction link

Steps to reproduce

The Stackblitz example can reproduce it:

  • Just open the example, a timer will toggle the chart option 3 times very fast: after ~10ms.
  • You can manually press the toggle button slowly to see that it works fine, when there is enough time
  • When I press the toggle button very fast, I can sometimes reproduce the issue

In production it is tricky to reproduce, since it seems to be a timing issue.

I guess, that it may happen when

  1. setOption is called
  2. and then setOption is called again before 1 has finished the animation

What is expected?

The new data should be drawn and the old discarded.
image

What is actually happening?

The merge operation seems to stop before updating to the new data.
2021-06-15_09h46_03


Note: the stackblitz example is only to reproduce the issue. Of course we don't have these kinds of timers in the production application. But we have also seen this in the production app, where we may have a timer to update the chart e.g. every 10 seconds and the user can also update the chart manually.
Now when the user updates almost at the same time as the timer, this issue is sometimes observed.

maybe related to:

@echarts-bot
Copy link

echarts-bot bot commented Jun 15, 2021

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that it contains a minimum reproducible demo and necessary images to illustrate. Otherwise, our committers will ask you to do so.

A minimum reproducible demo should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.

You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question.

If you are interested in the project, you may also subscribe our mailing list.

Have a nice day! 🍵

@echarts-bot echarts-bot bot added bug en This issue is in English pending We are not sure about whether this is a bug/new feature. waiting-for: community labels Jun 15, 2021
@tmtron tmtron changed the title setOption merge glitch glitch when setOption() is called in fast succession Jun 15, 2021
@pissang pissang added this to the 5.2.0 milestone Jun 15, 2021
@echarts-bot
Copy link

echarts-bot bot commented Jun 15, 2021

This issue is labeled with priority: high, which means it's a frequently asked problem and we will fix it ASAP.

@pissang pissang removed waiting-for: community pending We are not sure about whether this is a bug/new feature. labels Jun 16, 2021
@tmtron
Copy link
Author

tmtron commented Mar 28, 2023

It seems that this has been fixed: Working Stackblitz example using echarts 5.4.2

@tmtron tmtron closed this as completed Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug en This issue is in English priority: high
Projects
None yet
Development

No branches or pull requests

2 participants