Reputation: 741
I created a nice little chart with two scales using two datasets. I have read the documentation for ChartJS pretty thoroughly, but I can't seem to find out how to add specific colors to the chart scales (numbers). The left scale should be orange and the right one blue. Is this even possible, and if so, how do I do it? I don't think it's necessary for me to supply any source code for the chart itself, but let me know if it is.
Upvotes: 4
Views: 4739
Reputation: 89374
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.
Upvotes: 0