I am looking for the way to reach minimum value of the chart.
I found and tried options.scales.yAxes[n].ticks.beginAtZero = true
but 0 is too small to be a minimum value of my chart.
is there any way to set minimum value of the chart in Object(or using Method)?
Asked
Active
Viewed 491 times
-1

Junho Ahn
- 36
- 5
1 Answers
1
From your sample options
, it seems you're using Chart.js v2 but not v3 as the tag chart.js3 suggests.
Therefore, you can use options.scales.yAxes[n].ticks.min
From Chart.js v2.9.4 documentation:
min
: User defined minimum value for the scale, overrides minimum value from data.
The same could be achieved with Chart.js v3 by defining options.scales.y.min
as explained here.

uminder
- 23,831
- 5
- 37
- 72
-
thank you for your answer. I tried options.scales.y.min just now but it didnt work. i think my version is not 3. and options.scales.yAxes[n].ticks.min is so good. – Junho Ahn Apr 27 '21 at 04:57