So guys I'm using chartjs on a system here, but the pie and donut style does not display on the system. I imported the CDN's:
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.0/Chart.bundle.js"></script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.0/Chart.js"></script>
And I made a graph.js file to put the chatjs codes and import it into my head:
<code>var ctx = document.getElementById("ChartDonut");
var myDoughnutChart = new Chart(ctx, {
type: 'doughnut',
data: {
labels: ["Pagos","Pendentes"],
datasets: [{
data: [200, 137],
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)'
]
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero:true
}
}]
}
}
});</code>
In my html I call the CANVAS normally:
<canvas id="chartDonut"></canvas>
But neither DOUGHNUT nor PIE works. Does anyone know what?