-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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 not showing in Android 8.0/Android O #4570
Comments
@yuenghole are there any console messages or other errors? What browser were you using? |
Hi, it is an android APP and I was testing it with preview version of OS android O in android studio emulators, hence there is no console messages or errors shown. FYI, I am using Chart.js v2.6 and the Android O preview version can be downloaded at https://developer.android.com/preview/download.html or if using Android Studio 2.4 and above, it can be downloaded at the Virtual Device Manager. May find the screenshot as follow for references: |
@yuenghole i don't suppose it's possible to get the line where that error is occuring? Sounds like something is trying to look for |
oic, thanks. By the way, I also raised this issue to google at https://issuetracker.google.com/issues/64317427, for them to investigate why is it not showing in Android O. Thanks2 |
This might be possibly resolved in #4591 |
Tried to grab the latest from Master branch and tested again on Android O emulator, the chart still not displaying. |
Hi, may I know anymore suggestion? and when will the Chart,js v2.7 wil be released so that I can try again? thank you. |
@yuenghole I don't have any more ideas nor do I have a release date for 2.7 |
@yuenghole did v2.7 work for you? |
Hi - also found same problems on: Android Nougat v7.1.1, Android Oreo v8.0 ( the Android Nougat v7.0 is OK ) Tried new Chart.js version 2.7 and have same issue with chart not rendering .. |
@yuenghole @etimberg : Following on .. the feedback comments from Google re the issue posted above state: "Issue seems to be resolved in API 26 - Hence closing this issue." - not quite !! .. bug still there on Android v7.1.1 and v8.0 (API 26 revision: 6:5554). However, hope that the following helps someone (the following is a workaround where this is not perhaps a bug in Chart.js, but on Android) Workaround Solution - displays the chart but actions will be lost (mouse click, hover over etc): 1/ Wrap your canvas within a Div (add any styles to the div you may need) 2/ Suggest removing any 'animation' (although you could alter the code below in item 3/ to use the endAnimation event to track when to carry out the temp fix) - Add into your options: 3/ Add the following code - have made this simple, but could be improved re end of animation if required:
Hope that this helps someone - ( note this is not at present required in IOS as charts seem to render OK ) |
@yityrar is this still occurring on newer chrome builds? |
@etimberg - The latest Virtual Device tested was the API_26_-_Oreo_8.0_Revision_6 where this still had the anom. Have not had chance to test the Android 8.1 Oreo (API 27) yet released late last month. |
@yityrar As of 4/2018 this is still not working on API 27 Nexus 7 and 10 tablet emulators in Android Studio. |
Any updates to this? I am still experiencing this issue with API 26 :( |
Can confirm this is still an issue in Android 9 Pie WebView Chrome 66.0.3359.158. A workaround (albeit not desirable since it disables hardware acceleration) is |
FYI Chart.js now works just fine in Android Web View version I think this issue may now be closed. |
anyone found a possible solution? I just tried it on API 28 and android 9 and not working. tried also on api 26,27 |
@geraldo29 what version of the Android Web View did you use to test? |
Sometimes doesn‘t work with android emulator, but for me always on native devices :)
|
yes, i tried it on my native device and it worked perfectly. thanks |
confirmed, works on native device not in emulator |
@yuenghole @yityrar @thetazzbot @phpfs @geraldo29 @khasty1 Can we close this issue? If not, can someone provide instructions how to reproduce the issue and project files needed to debug easily. |
As far as I'm concerned, this is a dupe of #5676. There, I confirmed it was an issue with the Android WebView (https://bugs.chromium.org/p/chromium/issues/detail?id=872622) which has now been fixed (at least as of version |
Since there's been no movement on this for over a year, and this looks like an Android WebView issue I'm closing this |
Still the same issue in android api 27 |
this is a problem in android itself that chart.js cant do anything about it, when I test it with the most default docs page of mozilla (https://developer.mozilla.org/nl/docs/Web/API/Canvas_API) it also doesnt show anything so your only options are to either update or use a normal browser and not a webview |
Hi,
I just tested the Chart.js in the preview of Android 8.0/Android O and find out that the chart is not displaying. But it is displaying in android 7 and below.
Please advice.
Thanks.
The text was updated successfully, but these errors were encountered: