Highcharts 3.0,带有堆叠和非堆叠系列的面积图 - 如何修复? [英] Highcharts 3.0, area chart with stacked and unstacked series - how to fix?

查看:36
本文介绍了Highcharts 3.0,带有堆叠和非堆叠系列的面积图 - 如何修复?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个复杂的面积图,其中使用了一些堆叠和一些非堆叠系列.

I have a complex area chart, which uses some stacked and some unstacked series.

在版本 3 之前,一切正常.对于版本 3,在 Firefox 和 chrome 中都有一些奇怪的错误行为:此处示例:http://jsfiddle.net/jlbriggs/yj3FP/

Prior to version 3, everything worked fine. With version 3, there are some odd buggy behaviors, in both firefox and chrome: Example here: http://jsfiddle.net/jlbriggs/yj3FP/

stacking:'normal',

如果我禁用堆叠,一切看起来都符合预期.但我需要堆叠.因此,如果您注释掉 'stacking:normal' 行,您将看到图表应有的样子,除了堆叠部分...

If I disable stacking, everything looks as expected. But I need stacking. So, if you comment out the 'stacking:normal' line, you will see the chart as it should be, except for the stacking part...

在上面链接的示例中,如果隐藏除预测"系列之外的所有区域系列,您将看到看起来应该如何的东西.请注意,与预测"系列接壤的粗线已经消失了——它本来就不应该在那里!这条线是所有其他堆叠系列,它们不沿 x 轴延伸到预测"系列的区域,并在预测"系列上结束.

In the example linked to above, if you hide all of the area series except for the 'predicted' series, you will see things looking how they should. Notice that the big thick line bordering the 'predicted' series is gone - it shouldn't be there in the first place! that line is all of the other stacked series, which do not extend along the x axis into the area of the 'predicted' series, wrapping up and over the 'predicted' series.

现在,隐藏了那些堆叠区域系列,再次显示它们 - 注意线条扭曲和锯齿形的非常奇怪的方式......

Now, having hidden those stacked area series, show them again - notice the very bizarre way the line twists and zig zags....

我意识到这是一个复杂的解释.这是一个很难解释的问题:)

I realize this is a complex explanation. It is difficult problem to explain :)

所以问题是:

1) 这里发生了什么??

1) What is going on here??

2) 如何让它停止?:)

2) How do I make it stop?? :)

github 上的问题列为已解决,但我仍然遇到与此图表完全相同的问题.

The issues on github are listed as solved, but I am still having the exact same issue with this chart.

推荐答案

好的,解决方案:

我一直在 plotoptions 的系列级别设置 stacking:normal,并根据需要在系列级别禁用它.

I had been setting the stacking:normal at the series level in the plotoptions, and disabling it on a series by series level as needed.

我已经从绘图选项中删除了堆叠设置,而是仅根据需要按系列级别在系列上进行设置.

I have instead removed the stacking setting from the plot options, and instead only set it on a series by series level as needed.

问题消失了.

这篇关于Highcharts 3.0,带有堆叠和非堆叠系列的面积图 - 如何修复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆