Home › forums › Using CanvasJS › Uncaught TypeError: Cannot read property '0' of null › Reply To: Uncaught TypeError: Cannot read property '0' of null
Thanks, I forgot to say that I tried this but the animation disappears. See the following animation of before and after.
The underlying issues here is that because getJSON is asynchronous, it does not work with windows.onload and the graph remains empty. So I have to get the JSON data before I render the graph.
Is there a better way to handle this?