Font Awesome icons not rendering
See original GitHub issueI’m trying to show font awesome (4.7) icons as data labels, which seems like it should work because other unicode characters in other font families seem to work ok. Is there something else I should be doing besides the following?
this.options = {
plugins: {
datalabels: {
color: 'white',
display: context => {
return context.dataset.data[context.dataIndex] > 15;
},
font: {
weight: 'bold',
family: 'FontAwesome',
style: 'normal'
},
formatter: (value, context) => {
return `\\u${context.dataset.icon_code}`;
}
}
},
...
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (6 by maintainers)
Top Results From Across the Web
Troubleshooting | Font Awesome Docs
Are you using Font Awesome Free or Pro? - Some icons are only available in Font Awesome Pro. Double-check that the icon you...
Read more >html - Font Awesome icons are not working, I have included all ...
I am trying to use Font Awesome icons of version 4.1.0 on my website but they are not working, I have referenced them...
Read more >[Solved]: Font Awesome icons not showing on my website
How to fix Font Awesome version related issues. Check and confirm the Font Awesome version used on your website. To do so, open...
Read more >Why are my Font Awesome icons failing to show? - SiteFarm
First, determine which version of the Font Awesome library is currently being used on your SiteFarm site by right-clicking anywhere on the ...
Read more >Font Awesome Icons Not Showing: Ultimate Reference Guide
Check your Adblockers. An ad blocker can potentially stop icons from loading. Alternatively, you can long click the refresh icon, or use keyboard...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
font
should be underdatalabels
, in your file it’s underplugins
andfont.size
should be a number, not a string (same forlineHeight
).Yes, however for this app the datasets are being dynamically generated, and for various reasons the associated icon codes are only stored in the db as
f0c3
(for example). As a result I need to build the unicode values at runtime.