Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Solved] get garbled text after render chartjs unexpectedly #60

Open
kuomingwu opened this issue Jul 20, 2018 · 1 comment
Open

[Solved] get garbled text after render chartjs unexpectedly #60

kuomingwu opened this issue Jul 20, 2018 · 1 comment

Comments

@kuomingwu
Copy link

Hi everyone,

I run the sample and output image successful, but all text become garbled text in the image :

testimage

Did I miss something ?

[Environment]
OS : centos 7,5
Nodejs : v8.11.3
npm : 5.6.0

Thanks.

@kuomingwu
Copy link
Author

I had install font and set the parameter as below, it seems work now !

chartNode.on('beforeDraw', function (Chartjs) { //Chartjs.defaults //Chartjs.pluginService //Chartjs.scaleService //Chartjs.layoutService //Chartjs.helpers //Chartjs.controllers //etc Chartjs.defaults.global.defaultFontFamily = "cjkuni-ukai-fonts"; Chartjs.defaults.global.defaultFontSize = 18; Chartjs.defaults.global.defaultFontColor = 'blue'; });

@kuomingwu kuomingwu changed the title get garbled text after render chartjs unexpectedly [Solved] get garbled text after render chartjs unexpectedly Jul 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant