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

Chrome 124 - Charts disappearing after switching tabs #11777

Closed
annam-ph opened this issue May 17, 2024 · 11 comments
Closed

Chrome 124 - Charts disappearing after switching tabs #11777

annam-ph opened this issue May 17, 2024 · 11 comments

Comments

@annam-ph
Copy link

Expected behavior

Charts keep their previous state when I come back to my browser tab

Current behavior

Chart disappears when I switch to another tab, and then come back to the tab with the chart

Reproducible sample

https://www.chartjs.org/docs/4.4.3/samples/bar/border-radius.html

Optional extra steps/info to reproduce

  • Open the link to the chart.js demo
  • Switch to another tab
  • Come back - Notice that chart is no longer there (may need to repeat switching and back a few times to see this happen)
  • Hover over the chart to see it rerender

Possible solution

No response

Context

No response

chart.js version

v4.4.3, v3.9.1

Browser name and version

Chrome 124 & Chrome 125

Link to your project

No response

@HT808s
Copy link

HT808s commented May 17, 2024

I've noticed the same issue with the same Chrome version. It doesn't happen immediately but occurs after leaving the tab for a few minutes and then returning to it.

@ajulien973
Copy link

I can confirm the issue on Chrome 124 on my end. Not reproducible on Firefox Developer Edition 125

@LeeLenaleee
Copy link
Collaborator

LeeLenaleee commented May 18, 2024

This does not seem like a chart.js bug but a chrome issue. In discord someone posted a video where you can see the same behaviour on the w3 schools website for a default canvas tutorial.

https://discord.com/channels/1109494364788502548/1109497513720938546/1241275466267099136

So this issue needs to be reported at the chrome issue tracker.

@ishantgupta777
Copy link

++ having the same issue

@aljazdolenc
Copy link

Same issue

@mikethea1
Copy link

mikethea1 commented May 20, 2024

Same issue. Has anyone opened an issue in Chrome?

I get this on Chrome 125 as well.

@LeeLenaleee
Copy link
Collaborator

Closing this issue as this is not a chart.js issue but a chrome issue and thus should be reported and resolved in chrome instead.

@LeeLenaleee LeeLenaleee closed this as not planned Won't fix, can't repro, duplicate, stale May 20, 2024
@ian-whitestone
Copy link

ian-whitestone commented May 20, 2024

Looks like it is being tracked and worked on already by Google.

https://issuetracker.google.com/issues/328755781

@semeion-net
Copy link

semeion-net commented May 21, 2024

Not sure if this is helpful, but I noticed that the problem only appears if maintainAspectRatio is set to false in the chart options. If it is set to true, the charts stay visible. I'm using Chrome Version 124.0.6367.209 with an RTX3070.

@omonedeki
Copy link

Saw similar issue, will try the suggestion, to see if it works while chrome works a hotfix

@mikethea1
Copy link

For anyone it helps, I'm currently working around this by subscribing to the visibilitychanged event and re-rendering the chart whenever the tab transitions to visible.

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

10 participants