I expect defaultFontColor and scaleLabel.fontColor or at least scaleLabel.fontColor override this ridiculous '#666' default color
Default set in:
defaults._set('global', {
defaultColor: 'rgba(0,0,0,0.1)',
defaultFontColor: '#666',
defaultFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
defaultFontSize: 12,
defaultFontStyle: 'normal',
defaultLineHeight: 1.2,
showLines: true
});
is not overriden
I've noticed that in _drawLabels method tickFont.color is not properly set
https://codepen.io/sajTempler/pen/abZeBQa
try editing options object for a chart and change scaleLabel.fontColor or defaultFontColor
I am styling the chart with some stats
From the docs about the styling of the ticks you can see that the option to adjust the color of the scalelabel should be in the ticks config.
Ticks label color documentation: https://www.chartjs.org/docs/latest/axes/styling.html#tick-configuration
Default color documentation: https://www.chartjs.org/docs/latest/general/fonts.html
Default color change: https://codepen.io/leelenaleee/pen/GRqVrBm
Color in ticks label: https://codepen.io/leelenaleee/pen/xxOvgVe
The scale label configuration is nested under the scale configuration in the scaleLabel key
Says docs: https://www.chartjs.org/docs/latest/axes/labelling.html
Thanks for working examples @LeeLenaleee
@sajTempler scaleLabel in this case is a bad name. It's for the axis title. See https://codepen.io/etimberg/pen/bGeXLPB
Thanks for the answers @LeeLenaleee @etimberg
I guess this issue can be closed 🔐
Most helpful comment
From the docs about the styling of the ticks you can see that the option to adjust the color of the scalelabel should be in the ticks config.
Ticks label color documentation: https://www.chartjs.org/docs/latest/axes/styling.html#tick-configuration
Default color documentation: https://www.chartjs.org/docs/latest/general/fonts.html
Default color change: https://codepen.io/leelenaleee/pen/GRqVrBm
Color in ticks label: https://codepen.io/leelenaleee/pen/xxOvgVe