0👍
Try this,
this.myChart = new Chart(ctx, {
type: 'bar',
data: {
datasets: [{
backgroundColor: [
'rgba(0,128,0,0.2)',
'rgba(0,0,0,0)'
],
}]
},
options: {
scales: {
yAxes: [{
barPercentage: 0.5,
barThickness: 6,
maxBarThickness: 8,
minBarLength: 2
}]
}
}
});
- Chartjs-How do I resolve this error; 'document.getElementById('myChart').getContext' is undefined)?
- Chartjs-Javascript count daily occurrencies from a datatable for the creation of a linechart
Source:stackexchange.com