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

Animation not working when using OffscreenCanvas #10305

Closed
Waxolunist opened this issue Apr 19, 2022 · 4 comments
Closed

Animation not working when using OffscreenCanvas #10305

Waxolunist opened this issue Apr 19, 2022 · 4 comments

Comments

@Waxolunist
Copy link

Expected behavior

Animations work when using workers

Current behavior

Animations do not work

Reproducible sample

NA

Optional extra steps/info to reproduce

No response

Possible solution

No response

Context

No response

chart.js version

V3.7.1

Browser name and version

No response

Link to your project

No response

@etimberg
Copy link
Member

@Waxolunist do you have a test case for this?

@LeeLenaleee
Copy link
Collaborator

This is the correct behaviour, the annimations on the offscreen canvas are disabled by default with this pr: #9751.

Reason for it is that animations break chart.js in web workers because web workers dont have acess to the window object, replacing this in the code with self made other things break so thats why animations are disabled

@etimberg
Copy link
Member

Closing as this is working as-designed

@etimberg etimberg closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2022
@Redemption198
Copy link

Redemption198 commented Dec 19, 2022

You could have had updated the documentation at least. I wasted my time to get ChartJS to work inside a web worker only to find out that animations won't work.

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

4 participants