pmsereno
Posts: 12
Joined: Thu Mar 25, 2021 10:50 pm

Stacked Column Chart (Total)

Hi,

I have a stacked chart that I need to show on each column total the sum of the first and second series value.
The chart allways have 4 series but the total should be the first two series value (sum).
There is a way to do this?

Thanks
pmsereno
Posts: 12
Joined: Thu Mar 25, 2021 10:50 pm

Re: Stacked Column Chart (Total)

Demo: https://jsfiddle.net/jofy609z/

The total should be:
S1: 22.50%
S2: 8.80%
S3: 24.28%
S4: 15.15%
User avatar
dawid.d
Posts: 832
Joined: Thu Oct 06, 2022 11:31 am

Re: Stacked Column Chart (Total)

Hi,

Thanks for contacting us with your question!

Yes, it's possible and it's also very simple to achieve.
Just use the formatter and return the appropriate value from the specific object, which already contains the summed y-values from the points below and itself like in the demo below:

Demo: https://jsfiddle.net/BlackLabel/s64Le5wd/

Feel free to ask any further questions!
Best regards!
Dawid Draguła
Highcharts Developer

Return to “Highcharts Usage”