Trying to create something from chart.js

👍:0

Your Chart.js doughnut is not showing up because your code is causing a JavaScript error. Unfortunately, Chart.js also depends on jQuery… So you’ll need to import that too.

}; // <--- this shouldn't be here

var myDoughnutChart = new Chart(ctx[1]).Doughnut(data);

Removing the }; should fix it.

In the future, you can use debugging tools as indicated in the w3 schools article on debugging JavaScript.

Here is a working version of your code on JSFiddle

Leave a comment