40👍
You need to set padding to display the labels properly. Also, adjust the canvas width and height to account for padding so that your chart doesn’t get too small.
options: {
layout: {
padding: {
left: 50,
right: 50,
top: 50,
bottom: 50
}
}
}
6👍
Set max tick in chart option, for example:
this.chartOption.scales.yAxes[0].ticks.max = Math.max(...chartData3.datasets[0].data) * 1.2
- [Chartjs]-Filling area between two lines – Chart.js v2
- [Chartjs]-Create a multi line chart using Chart.js
Source:stackexchange.com