Reputation: 507
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!
Upvotes: 5
Views: 9458
Reputation: 351
For global use: Chart.defaults.font.family = "Lato"
.
Details here.
Upvotes: 11
Reputation: 6329
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
}
}
}
}
Upvotes: 2