[Chartjs]-Chart not displaying from JSON data

1👍

The issue has been resolved by removing the following line of code from app.php:

data = JSON.parse(data);

0👍

Your way to get chart is wrong, you are getting only html element, but you need to get context, you can do this like:

$("#mycanvas").get(0).getContext('2d');

or

document.getElementById('mycanvas').getContext('2d');

Leave a comment