jakubatg
Posts: 1
Joined: Fri May 06, 2022 2:57 pm

Pie Chart with SVG Icons inside each chart segment

Hi,

I'm new to HighCharts and wanted to find out if it's possible to create a piechart which has a predefined SVG icon inside each of the segments?
Ideally I'd like to use a formatter so that the SVG can be set based on the category name from the data.
I'm not sure if something like that is even possible with pie charts.
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Pie Chart with SVG Icons inside each chart segment

Hi jakubatg,

Welcome to our forum and thanks for contacting us with your question!

Yes, something like that is possible. As you suggested, you can for example use data labels formatter to show images / icons instead of regular labels.
Demo:https://jsfiddle.net/BlackLabel/wyjr8kxu/
API reference: https://api.highcharts.com/highcharts/s ... .formatter
https://api.highcharts.com/highcharts/s ... ls.useHTML

Let me know if it was what you were looking for.
Regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Usage”