trusha
Posts: 2
Joined: Thu Nov 07, 2024 1:56 pm

Show legend groupby stack in stacked column chart

Hi Team,

I am using Column Stacked chart, chart has 2 stacks US/Global and 6 categories leading to 12 series. Each category has two series one for US and another for Global. I need to show grouped legend as shown in attached file.

Also, how to show stack at the top left US/Global

https://www.highcharts.com/demo/highcha ... nd-grouped

Thanks you
Attachments
StackedColum-Ex.jpg
StackedColum-Ex.jpg (27.98 KiB) Viewed 473 times
trusha
Posts: 2
Joined: Thu Nov 07, 2024 1:56 pm

Re: Show legend groupby stack in stacked column chart

Hi there,

Any idea how to customize legend for stacked col chart?
User avatar
dawid.d
Site Moderator
Posts: 1183
Joined: Thu Oct 06, 2022 11:31 am

Re: Show legend groupby stack in stacked column chart

Hello,

Welcome to our forum and thanks for the question!

Let's assume you already have a chart like this: https://jsfiddle.net/BlackLabel/4x80cfpy/

Drawing such a custom legend requires the use of a renderer. You can read more about it here:
https://www.highcharts.com/docs/advance ... s/renderer

Below I have sent you an example of use that you can extend to your needs.
Demo: https://jsfiddle.net/BlackLabel/krdvu3a2/

If you have problems with arranging this code, do not hesitate to write, I will be happy to help further.

Best regards,
Dawid Draguła
Highcharts Developer

Return to “Highcharts Stock”