rohit9133
Posts: 10
Joined: Mon Mar 27, 2023 7:01 am

Multi svg icons for different categories in Bar.

Hi,

I need to achieve a bar chart with below design:
https://drive.google.com/file/d/1cD7jXT ... share_link

I am facing issue to put different svg icons inside the same series like below:
http://jsfiddle.net/kcgLxtvy/1/

Thanks in advance,
Rohit
kamil.k
Posts: 458
Joined: Thu Oct 06, 2022 12:49 pm

Re: Multi svg icons for different categories in Bar.

Hello rohit9133,

Thanks for contacting us again!

I'd suggest refactoring your series.data to the array of objects and simply passing the id property to each as a representation of a key that will be helpful for assigning proper icon. Then inside the formatter you can easily take use of it by reference to the particular point. I've updated your demo, take a look: http://jsfiddle.net/BlackLabel/ptckfa6m/.

As you can see, I've created a simple object for better icons map at the top but it's totally up to you how you reference them.

Let me know if that was what you were looking for,
Kind Regards!
Kamil Kubik
Highcharts Developer

Return to “Highcharts Usage”