Highcharts 3.0, area chart with stacked and unstacked series - how to fix?

ε祈祈猫儿з 提交于 2019-12-23 18:14:37

问题


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

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',

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...

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 :)

So the question is:

1) What is going on here??

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

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


回答1:


Ok, solution:

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.

Problem went away.



来源:https://stackoverflow.com/questions/15621253/highcharts-3-0-area-chart-with-stacked-and-unstacked-series-how-to-fix

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