1👍
You can set the fontcolor with fillstyle:
ctx.fillStyle = 'blue';
Just set it to the color you need similiar to the way you are setting the text, if you defined the color in the option’s aswell you could do it like this:
ctx.fillStyle = chart.options.centercolor;
Make sure to remove labelFontColor : "#DC1B3A"
from your code.
- Chartjs-How to apply each color to each dataset
- Chartjs-How can I use npm-plugins with react-chartjs-2?
Source:stackexchange.com