SNYDERHAUS
SNYDERHAUS

Reputation: 451

ChartJS set yAxes "ticks"

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
                    }
                }
            ]

Upvotes: 7

Views: 18569

Answers (1)

jtmaher2
jtmaher2

Reputation: 482

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

See chart.js docs

Upvotes: 14

Related Questions