Home forums Using CanvasJS CanvasJS with mobile mode. Reply To: CanvasJS with mobile mode.


Sunil Urs


Then you are probably calling chart.render() even before the width and height of Chart’s Container (DIV) is set/initialized by the browser. Basically you need to call chart.render() after the DIV is initialized by browser. In case you are not able to find a way to do that, you can work around such problems by calling chart.render() after a bit of delay by using setTimeout – something like 500ms or 1000ms should work.

In case you are still not able to fix the issue, please create a jsfiddle so that we can have a look.

Sunil Urs