0👍
In your options, try setting suggestedMin: -1
instead of beginAtZero: true
, like so:
options: {
scales: {
yAxes: [{
ticks: {
suggestedMin: -1,
}
}],
}
}
Furthermore, I would suggest updating the dataset instead of redrawing the chart each time by using the myChart.update()
function.
- Chartjs-Ng2-charts does not work When data is between 2 and 5
- Chartjs-How I can change the font-family of labels in the bar chart?
Source:stackexchange.com