且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Highcharts帮助 - 面积图堆叠

更新时间:2023-02-05 14:28:57

使用堆叠时,某个x值的每个系列的值会添加在一起,y值对应于累积序列的总和。所以上面的图表看起来确定我想。
对于2010-08它添加2 + 4 = 6这是y轴的值,
为2010-09它添加4 + 4 = 8。

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.

为了使您的数据与堆叠一起工作,您需要从total中减去in-service。或者可能有两个系列命名为服务中和服务中断。当堆叠这两个系列时,你将得到总数。

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.