How can I add font awesome icon as label on amcharts 4 pie?
here is my codepen.io/emiks/pen/bZLeLM
PS: couldnt do it as link, sorry
You can use the html
attribute on the template label. There you can also use the icon placeholder {icon}
:
pieSeries.labels.template.html = '<i class="fas {icon}"></i>';
Which will result in the following chart:
I forked your code pen and updated it here.
Edit:
To change the size of the icons you can use the font-awesome size classes: fa-2x
, fa-3x
, ...