I tried both this:
plugin: {
label: {
font: {
family: "Lato"
}
}
}
and this:
myChart.defaults.global.defaultFontFamily = "Lato";
Pieces of code to add Lato
font family to my chart, but both cases didn't work.
Any better suggestions? Note that the version I use is 3.7.0. Thanks in advance!
I tried both this:
plugin: {
label: {
font: {
family: "Lato"
}
}
}
and this:
myChart.defaults.global.defaultFontFamily = "Lato";
Pieces of code to add Lato
font family to my chart, but both cases didn't work.
Any better suggestions? Note that the version I use is 3.7.0. Thanks in advance!
Share Improve this question edited Jan 19, 2022 at 11:12 code 6,3394 gold badges20 silver badges46 bronze badges asked Jan 19, 2022 at 0:41 Jameu Lukasli1Jameu Lukasli1 5075 silver badges22 bronze badges2 Answers
Reset to default 11For global use: Chart.defaults.font.family = "Lato"
.
Details here.
The correct way to specify would be like this (in options
):
plugins: { // not plugin
legend: { // extra layer: legend
labels: { // with an "s"
font: {
family: "Lato" // right here
}
}
}
}