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

[Request] Font Awesome support #9

Open
BlackYuzia opened this issue Mar 2, 2019 · 1 comment
Open

[Request] Font Awesome support #9

BlackYuzia opened this issue Mar 2, 2019 · 1 comment

Comments

@JohnArcher
Copy link
Contributor

Assuming you use the current free version of FontAwesome 5.8.x you can add these font icons like this to doughnutlabel:

{
    text: "\uf1ea",
    font: {
        size: '30',
        family: '"Font Awesome 5 Free"'
    }
}

You get the value for text from the all.css: Just look for the icon you would like to show, e.g. fa-network-wired, take the value of content and add the letter u between \ and f!

It is not as convinient as using the fa classes, but it works.

If it does not work you may have to wait until the css is loaded, so the creation of your chart should be put in a setTimeout() call.

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

2 participants