-
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
Flickering on resize #4179
Comments
That's interesting. I've never noticed that before. I profiled the codepen and there wasn't any long running JavaScript. Does this only reproduce for you in Chrome? |
Same problem here, but sligthly more embarassing than a quick flickering. |
Wow I just saw that the video doesn't even show the continous flickering. It's much more horrible than shown in the video. Maybe you've got a chance to try it yourself in chrome. You just need to resize it until the vertical scrollbar disappears. Makes this library unuseable for me, sorry. |
This might be a duplicate of #2127 The underlying issue is that Chart.js tries to fill it's parent container. The chart expands large enough that the height causes the scrollbar to appear, which in turn shrinks the area the chart can use, which makes the chart smaller, which means the scrollbar goes away and the issue repeats forever since there isn't a good way to detect this case that works everywhere. Potential work-arounds:
|
Webkit browsers like Safari and Chrome subtract the scroll bar width from the visible page width when calculating width: 100% or 100vw. More at DM Rutherford's Scrolling and Page Width. Try using |
On a larger screen, the netPowerGauge graph would flicker a right margin every time the value was updated. I seemed to fix this by just making the container's height a little larger. Some more info on (maybe) the same issue: chartjs/Chart.js#4179
|
Looks like this has been fixed at some point, or I just can reproduce it with my laptop. |
This was fixed by #6011 |
I had the Flickering issue in chrome in various zooms, adding a div as a sibling helped me:
Credits: #11005 (comment) |
Well very easy to describe as it's also happening in your original codepen.io template. I couldn't find anything in your documentation regarding this behaviour, hence I assume it's a bug.
I am using Chrome Version 58.0.3029.81 and when resizing the width of the browser window (until the point when the vertical scrollbar goes away) it will start flickering. I have used this codepen template to verify this behaviour: https://codepen.io/pen?template=JXVYzq
Please see this video, which demonstrates the issue: https://streamable.com/22hi0
Am I missing something?
The text was updated successfully, but these errors were encountered: