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

chart.update('none') while animations are in progress is lost #11957

Open
kurkle opened this issue Nov 18, 2024 · 0 comments
Open

chart.update('none') while animations are in progress is lost #11957

kurkle opened this issue Nov 18, 2024 · 0 comments

Comments

@kurkle
Copy link
Member

kurkle commented Nov 18, 2024

Expected behavior

When update('none') is called, already running animations are updated with new values - or the animations are aborted (bad, but at least the result is correct)

Current behavior

While fixing issues in zoom plugin, noticed that if there is an animation (zoom) ongoing and during that zoom user pans the chart =update('none'), points (in this case it was a scatter chart) end up in the wrong places. Panning again fixes the chart.

What happes is:

  • animations are running, having for example some target coordinates for the points
  • update none updates the points directly with correct values
  • next frame, the animations override those directly updated values with the next step in animation - the update is lost
image

Reproducible sample

https://codepen.io/kurkle/pen/NWQVbyB

Optional extra steps/info to reproduce

No response

Possible solution

No response

Context

No response

chart.js version

v4.4.6

Browser name and version

No response

Link to your project

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant