0👍
You are defining fill
as true
which is equivalent to origin
for backwards compatibility. This mode fills to the zero line.
To get the behaviour you want you need to change from fill: true
to fill: 'start'
.
Here in the documentation you can see how all the different filling modes affect the chart: https://www.chartjs.org/docs/master/samples/area/line-boundaries.html
- Chartjs-Rendering multiple chart.js charts in one page when scroll to the section
- Chartjs-Update chart.js after form submission and page reload
Source:stackexchange.com