confusedDude
Posts: 21
Joined: Wed Jul 27, 2022 9:31 am

Percent stacking

Hey.

I have a graph with two series. I have set plotoptions.area.stacking = "percent" and chart.type = "area"
But the series doesnt stack ontop of eachother. Its just like they dont take notice of eachother. You have any clue why this is?


Image
https://imgur.com/rgkrLTj
jakub.s
Posts: 1164
Joined: Fri Dec 16, 2022 11:45 am

Re: Percent stacking

Hi,

Thanks for the question!

Here's an example of plotOptions.area.stacking = 'percent': https://jsfiddle.net/BlackLabel/ez8h6yLw/

It is how it's supposed to look like because this options stacks the areas based on percentages. If you want other stacking type you could use plotOptions.area.stacking = 'normal' like here: https://jsfiddle.net/BlackLabel/97ra8dgp/

Let me know if you have any more questions.

Best regards,
Jakub
Jakub
Highcharts Developer
confusedDude
Posts: 21
Joined: Wed Jul 27, 2022 9:31 am

Re: Percent stacking

hey thanks for answering.

Yea, but as you can see in this photo, it says both values are 50 but both of the graphs still show as 100 and covering eachother. What i excpect to see is that the green one is filled 0-50 and and the blue one 50-100

https://imgur.com/tAsURI6
jakub.s
Posts: 1164
Joined: Fri Dec 16, 2022 11:45 am

Re: Percent stacking

I don't think I understand. That's just how the stacking: percent works for the area chart - https://jsfiddle.net/BlackLabel/ez8h6yLw/

Could you please send me a demo of your example and explain exactly how you'd like it to look like?

Only then will I be able to help.

Regards,
Jakub
Jakub
Highcharts Developer

Return to “Highcharts Usage”