Highcharts help - Area chart stacking

╄→尐↘猪︶ㄣ 提交于 2019-12-25 03:47:22

问题


Maybe I am not understanding the area chart properly but here is an image to properly display what the problem is and what I am looking for:

Can someone explain why stacking: normal display values like it does? And how to possibly fix it? I have tried stacking: null, and stacking: percent, but both do not give the desired results.

EDIT: I see my error, however, I'm not sure how to fix it. I need to graph the two series in a group so that they are rendered together and not normalized. Any ideas?


回答1:


When stacking is used, the values of each series for a certain x-value is added together (stacked), and the y-value corresponds to the total of the accumulated series. So the upper graphs looks ok I think. For 2010-08 its adding 2 + 4 = 6 which is the value of the y-axis and, for 2010-09 its adding 4 + 4 = 8.

To make your data work with stacking, you want to subtract the 'in-service' from 'total'. Or maybe have two series named 'in-service' and 'out-of-service'. When stacking those two series you will get the total.



来源:https://stackoverflow.com/questions/7197487/highcharts-help-area-chart-stacking

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!