0👍
Looks like you’re missing the x-axis font settings:
var doughnutChart = new Chart(ctx, {
...
scales: {
...
xAxes: [
{
ticks: {
fontFamily: 'Montserrat, sans-serif',
},
},
],
},
},
});
Here is the demo: https://jsfiddle.net/mbratch/wxgry4p2/1/
But you could set the default font for the whole chart if that’s the desired result:
Chart.defaults.global.defaultFontFamily = 'Montserrat, sans-serif';
var doughnutChart = new Chart(ctx, {
... // no need to set font family in here
});
- Chartjs-Chart.js: Can I change the "OriginalOptions" variable within the chartjs-zoom-plugin?
- Chartjs-Chartjs line graph point hover animation buggy / jumpy
Source:stackexchange.com