0
votes

I am working on Highcharts API, In my chart I am using multiple series with stacked bar charts. The requirement is to show the square marker on an expected value(that may be sometimes different then the current percentage) on each bar in percent view. I have added two series, one is showing bars perfect on the current percentage but the second series appears like straight line on 100. The same scenario works in 'normal' view perfectly.

I have tried recreating the problem in fiddle, in the fiddle the temperature series is a straight line rather than displaying the diferent percentage and the other is showing perfect percentage.

I am eager to know how the percent view calculates the percentage in case of multiple series. I'm looking for some tracks and advices about my code and thank you in Advance.

1
Okay, but when you set stacking: 'percent' it means that values will be recalculated to scale 0 - 100%, it doesn't compare values in any way. What can you do is to set stacking only for column types in plotOptions.Paweł Fus
yes, that is the expected behavior of percent stacking. The different series stack together to make 100%.jlbriggs

1 Answers

2
votes

Not totally sure I understand what you want, but here's two potential fixes:

Remove stacking: 'percent' from the plotOptions and the second graph will render proper as separate lines

http://jsfiddle.net/nCmDp/1/


Remove type: 'line' from the series and add type: 'column' to the chart if you want stacked percentage bar graph

http://jsfiddle.net/vA5Se/


Edit:

Check here to see how to make a standard stack bar graph http://jsfiddle.net/gh/get/jquery/1.9.1/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/column-stacked/