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

iPad doesn't render any chart.js canvas #9927

Closed
theRealBaccata opened this issue Nov 30, 2021 · 2 comments
Closed

iPad doesn't render any chart.js canvas #9927

theRealBaccata opened this issue Nov 30, 2021 · 2 comments

Comments

@theRealBaccata
Copy link

Expected Behavior

After developing some beautiful charts using chart.js I started testing the results on some real devices. Everything's looking fine on my desktops and smartphones. So I opened https://www.chartjs.org/ on my iPad device to continue testing.

Was expecting to see some nice canvas as I see on other devices (desktop, android).

Current Behavior

Well I do see the page, however I don't see the canvas. At all. Neither on Safari nor Chrome. Also tried incognito mode. Please have a look at this screenshot:

Image-1

Steps to Reproduce

  1. Grab an iPad, preferable iPad Air 1
  2. Open Safari or Google Chrome
  3. Feel free to browse to https://www.chartjs.org/

Context

Needles to say, my chart.js canvas are also not shown, also https://codepen.io/pen?template=BapRepQ doesn't show a chart. However these W3Schools canvas are rendered just fine.

Environment

  • Chart.js version: Chart.js v3.5.0
  • Device: iPad Air 1 (MD788FD/A) v.12.4.8
  • Browser name and version: Safari (don't know how to get the version, I'm not an iOS user) & Google Chrome (92.0.4515.90)
  • For Chrome: Tested also the incognito mode.
@LeeLenaleee
Copy link
Collaborator

It seems like this is a duplicate of #8414.

Since chart.js v3 we make use of the resize observer which is not supported in outdated browsers.
I dont see any chrome for IOS in the caniuse table but if they hold the same versioning as for android it explains why it doesnt show in chrome and safari. To solve this you will need to polyfill the resize observer

https://caniuse.com/resizeobserver

@theRealBaccata
Copy link
Author

@LeeLenaleee Thank you very much for your response. I added resize-observer and it's now working like a charm.

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

2 participants