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

Add support for workers (OffscreenCanvas) #9

Open
tobiu opened this issue Sep 3, 2024 · 0 comments
Open

Add support for workers (OffscreenCanvas) #9

tobiu opened this issue Sep 3, 2024 · 0 comments

Comments

@tobiu
Copy link

tobiu commented Sep 3, 2024

related to:
chartjs/Chart.js#11891

Dedicated workers do support request / cancelAnimationFrame. SharedWorkers however sadly do not.

https://github.com/Robloche/chartjs-plugin-streaming/blob/master/src/helpers/helpers.streaming.js#L28C1-L33C6

const cancelAnimFrame = (function() {
  if (typeof window === 'undefined') {
    return noop;
  }
  return window.cancelAnimationFrame;
}());

needs a change.

bigger picture:
chartjs/Chart.js#11890

=> especially streaming data is a perfect use case for OffscreenCanvas.

best regards,
tobias

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

No branches or pull requests

1 participant