'How to set min Value a step down of min value received from database in Y Axis in ChartJS

I am displaying a chart showing month on x and amount y from values received from database. Say X = Jan21, Feb21, March21 and So on. Y = 1000, 1500, 2000 and So on. Step automatically coming 500. Now when i plot the chart, starting value start with 1000 and chart showing from bottom which looks odd visually. so can i get Y axis starting value as 500( step value ) Thanks in Advance...



Solution 1:[1]

add this into your chart options

scales: {
        y: {
            min: 500,
            ticks: {
                stepSize: 500
            }
        }
    } 

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Bhargav Rangani