1👍
✅
You need to define options.scales.x.max
as follows:
options: {
scales: {
x: {
max: 5,
...
For further information, please consult Min Max Configuration from the Chart.js documentation
Source:stackexchange.com