ChartJS set yAxes "ticks"

16,987

To do this, change stepValue: 10 to stepSize: 25, and remove steps: 10,.

See chart.js docs

Share:
16,987
Bryce Snyder
Author by

Bryce Snyder

I'm a Front End Developer from Kitchener, ON. My passions are designing, developing and taking on challenging projects that create immense end-user experiences.

Updated on June 28, 2022

Comments

  • Bryce Snyder
    Bryce Snyder almost 2 years

    I am trying to adjust the scales on my yAxes and cannot find any information that isn't outdated.

    Basically, I want my yAxes to go from 0 - 100 with steps of 25.

    https://codepen.io/brycesnyder/pen/wmJKyv

                yAxes: [
                    {
                        ticks: {
                            beginAtZero: true,
                            steps: 10,
                            stepValue: 10,
                            max: 100
                        }
                    }
                ]
    
  • Bryce Snyder
    Bryce Snyder about 6 years
    YOU SAVED ME!! Thank you!