Sam10
Posts: 22
Joined: Thu Mar 24, 2022 10:52 am

HighCharts Pie Legends

Hello!
Can anyone please help me on making legends like in the pictures
Here is the fiddle pie
https://jsfiddle.net/5sg92jvu/5/
Attachments
Screenshot_1.png
Screenshot_1.png (15.63 KiB) Viewed 339 times
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: HighCharts Pie Legends

Hello,

You can use legend.labelFormatter() callback function to return more data than only series name. If you set legend.useHTML on true it will allow you to return div with CSS styles like flex to achieve the look of the table.

Demo: https://jsfiddle.net/BlackLabel/rzb84n9e/
API: https://api.highcharts.com/highcharts/l ... lFormatter
https://api.highcharts.com/highcharts/legend.useHTML

Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/
Sam10
Posts: 22
Joined: Thu Mar 24, 2022 10:52 am

Re: HighCharts Pie Legends

Thanks for the response appreciate it :D
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: HighCharts Pie Legends

You're welcome!

In case of any further questions, feel free to contact us again.
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/

Return to “Highcharts Usage”