Chart.js: Lag on load

Created on 28 Feb 2017  路  7Comments  路  Source: chartjs/Chart.js

Is it possible to avoid the lag on load on ChartJS 2? ChartJS 1 seemed to load more efficient.

Even on the documentation page it lags a bit http://www.chartjs.org/docs/

See my attached gif for how it loads for me. It doesn't look pretty and don't give a smooth effect on the page.

ezgif com-video-to-gif

help wanted duplicate bug

All 7 comments

@EmilMoe do you happen to be running an ad blocker? This might have to do with how we detect resizes using an iframe. Is it possible to attach a chrome profile from your machine?

@etimberg That was it !

However many people are running adblockers, is it possible to avoid this problem even with AdBlockers enabled?

(I have AdBlock, AdBlock Plus, uBlock, so I'm like a worst case scenario)

uBlock doesn't affect this, so it's only AdBlock and AdBlock Plus.

Here's a profile as per request @etimberg

https://emilmoe.com/CPU-20170228T141553.cpuprofile

Thanks, we are trying to remove the iframe for v2.6 so closing this as a duplicate of #2024. One solution if you are using v2.5 is to set responsive: false which will not add the iframe. You'd need to do any resizing of the chart manually however. When the container resizes, you can do chart.resize() to trigger an update.

I might try that, but responsive has been a huge headache to me earlier.

Do you know when you expect 2.6 to be released?

I don't have an expected release date at this time unfortunately. There are still lots of open issues ib the 2.6 milestone

Was this page helpful?
0 / 5 - 0 ratings