[Chartjs]-ChartJS — How do I change scale color when I have to scales?

5👍

Take a look at “Tick Configuration” under “Scales”. You need to set the fontColor option for each axis. Like this:

options: {
    scales: {
        yAxes: [{
            ticks: {
                fontColor: "#666"
            }
        }]
    }
}

0👍

With Chart.js 4.3.1, the configuration could look like this:

{
    options: {
        scales: {
            y: {
                title: {
                    text: 'Some title',
                    display: true
                },
                ticks: {
                    color: 'blue' // can also use hex color codes
                }
            }
        }
    }
}

See the documentation for Common tick options to all axes.

Leave a comment