Chartjs is not rendering

๐Ÿ‘:0

the parameter options is not defined!

try this code

 var hours = new Chart(document.getElementById("hours").getContext("2d")).Doughnut(data);

or this code is more clear

 // Get the context of the canvas element we want to select
        var ctx = document.getElementById("hours").getContext("2d");
        var myNewChart = new Chart(ctx).Doughnut(data);

Leave a comment