chartjs-node icon indicating copy to clipboard operation
chartjs-node copied to clipboard

Problem with font at Centos7

Open LudmilaShilo opened this issue 7 years ago • 2 comments

Hi, all! Thank you for the very useful module:) Pls, help with the following problem. I use chartjs-node in my project. It perfectly works on my computer. screen shot 2018-10-11 at 4 50 42 pm But it doesn't work correctly at a server. screen shot 2018-10-11 at 4 53 04 pm

I use node.js v8.12.0 at both sides. Mac OC at the computer. The Centos 7 at digitalocean. How can I fix this bug at Centos 7.

LudmilaShilo avatar Oct 11 '18 13:10 LudmilaShilo

The font required is not installed on the CentOS server, but is on your computer You can use the command fc-list to list installed fonts in CentOS,

You can then install new ones e.g. yum install open-sans-fonts and select the font in the 'beforeDraw' function

chartNode.on('beforeDraw', function (Chartjs) { Chartjs.defaults.global.defaultFontFamily = 'Open Sans'; });

grahamwells avatar Oct 31 '18 14:10 grahamwells

hi @LudmilaShilo , can you please tell me how you solved the problem if you did ?

zakariakhorf avatar Jul 30 '21 11:07 zakariakhorf