1👍
It looks like you can update the axes of your charts to a new default. So, using a modified form of their example, something like the following (modified to fit your code):
// ...
scales: {
yAxes: [{
display: false,
gridLines: {
display: false
},
ticks: {
max: Math.max(...data.datasets[0].data) + 20,
min: -3, // ADDED
display: false,
beginAtZero: true
}
}],
// ...
… would do what you’re looking for – with the side benefit that 0 and 3 wouldn’t look like the same value, the relative bar size should stay accurate.
- [Chartjs]-How can I implement Polar area charts with Chart.js and Canvas
- [Chartjs]-ChartJS and DiscordJS implementation question
Source:stackexchange.com