Home › forums › Using CanvasJS › Chart only Draws after Inspect Element
Tagged: CSS, order, render, timing
This topic contains 4 replies, has 2 voices, and was last updated by wonky 2 months, 2 weeks ago.
This seems to be a common enough issue that maybe there’s a checklist of things to verify :
You can see the effect at http://voicerankmax.website/demo1/Coinlist_Sparkline1_list.php – The charts in the Chart7 column only draw after a resize of the window.
I went through the source code of the page that you have shared and observed that, within the showScript1757, showScript1758 and showScript1759 methods, you are instantiating new charts as chart_1757, chart_1758 and chart_1759 but calling render method as chart.render() and not chart_1757.render(). Calling render method on instantiated objects should work fine in your case, i.e changingchart.render(); to chart_1757.render();.
showScript1757, showScript1758 and showScript1759
chart_1757, chart_1758 and chart_1759
chart.render(); to chart_1757.render();
A diff of the original version that I had, and the fixed version shows only that one change.
Thanks for the quick and precise support!
You must be logged in to reply to this topic.