Home forums Using CanvasJS Charts aren't full-size until page is refreshed Reply To: Charts aren't full-size until page is refreshed

#4850

Sunil Urs
Keymaster

You can write something like

var chart = null;
setTimeout(function(){
 
chart = [create chart here]
chart.render();

},3000);
//3000 ms delay. Try increasing/decreasing the delay. 

Please remember this is not the ideal way to go. Am suggesting this just to confirm if the dimensions of the container are being set very late. If this works, you can instead try adding the chart rendering logic (without delay) at the end of the page (after all the other script tags) so that it runs after all other scripts are done.


Sunil Urs