-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 does not render properly when it was generated in not active tab in chrome #924
Comments
I saw the same bug in Chrome when rendering bar charts. I was able to fix this by changing this line in c3.js: $$.redrawBar(drawBar, false), // changed from true to false to fix bug (line 626) |
Hi, tw3 As I understand with this change in code you will loose smooth transitions. Compare transition behaviour in http://c3js.org/samples/chart_bar_stacked.html and http://jsfiddle.net/norecces/sq5Lq7br/1/ |
I've noticed this quite a lot recently working with C3, seems like if a chart is rendered and not painted, it will paint only upon being told to resize or flush or whatever. According to #936, charts also fail to render properly if they're not visible and are then made as such. |
See this SO answer. It's a broader problem with D3, due to IMO, the answer is 100% to drop all D3 |
…ctive tabs. Fixes c3js#924.
Adds c3_chart_internal_fn.isTabVisible to disable transitions on inactive tabs. Fixes #924.
I'm facing this problem with version 0.6.7. Its happening with examples too. To reproduce, open an example chart in a new tab with Chrome. Wait a few seconds and switch to the new tab, the chart isn't rendered correctly. Chrome version: 69.0.3497.81 (linux) |
Seems like its already reported: |
I opened http://c3js.org/samples/chart_combination.html from http://c3js.org/examples.html by clicking at link and opening it in new tab. Then I waited few seconds and went to combination example. It was not rendered (Actually it was but wrong).
To get chart visible I had to resize window. If it is only one tab in chrome, this bug does not seem to appear.
Google Chrome 39.0.2171.99 m
The text was updated successfully, but these errors were encountered: