3👍
You should do this in options… Second argument of this.renderChart.
just put the fontColor option:
...
mounted () {
// Overwriting base render method with actual data.
this.renderChart({
labels: [...],
datasets: [
...
],
},
{
responsive: true,
maintainAspectRatio: false,
legend: {
...,
fontColor: 'white'
},
...
scales: {
yAxes: [{
ticks: {
...
fontColor: 'white'
}
}],
xAxes: [{
ticks: {
...
fontColor: 'white',
}
}]
}
})
}
- [Chartjs]-ChartJS – points overplotting, jittering, noise?
- [Chartjs]-Moving vertical line when hovering over the chart using chart.js
Source:stackexchange.com