Highcharts 帮助 - 面积图堆叠
也许我没有正确理解面积图,但这里有一个图像可以正确显示问题所在以及我正在寻找的内容:
有人可以解释为什么堆叠:像它一样的正常显示值吗?以及如何解决它?我尝试过 stacking: null 和 stacking:percent,但两者都没有给出所需的结果。
编辑:我看到了我的错误,但是,我不知道如何修复它。我需要将两个系列绘制成一组,以便它们一起渲染而不是标准化。有什么想法吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用堆叠时,将某个 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.
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.