Highcharts - 面积图 - 堆叠包含负值和正值的系列 [英] Highcharts - Area Chart - Stacking with series containing negative and positive values

查看:112
本文介绍了Highcharts - 面积图 - 堆叠包含负值和正值的系列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在从Highcharts 2.3.2升级到当前版本,我们在堆积面积图方面遇到了一些问题。问题是堆叠:'正常'当我们的系列包含正值和负值时,行为不符合预期。

We are upgrading from Highcharts 2.3.2 to current version, and we have some problems with stacked area charts. The problem is that stacking:'normal' behavior is not as expected when we have series that contain both positive and negative values.

JsFiddles:

JsFiddles:

Highcharts 2 - 所需行为 见图表2

Highcharts Current - 不需要的行为 参见图表2

我们设法通过使用堆栈每个系列的属性(见第二个JsFiddle中的图表1 )。

We have managed to fix this issue in charts that contain series with either only positive or only negative values, by using the stack attribute on each series (see chart 1 in second JsFiddle).

有人能指出我们解决这个问题的方向吗?

Can anyone point us to a direction on resolving this issue?

推荐答案

我当时能够在此stackoverflow答案的解释帮助下解决问题,尽管在6月的解决方法中, 19 14:40和6月19日16:20,t这里是Con的单个负点,前后有正数。当你有多个这样的系列时,这可能会引起问题,即哪一个堆叠在另一个上面将是一个问题。

I was able to workaround it with the help of explanation given in this stackoverflow answer, though in my workaround at June, 19 14:40 and June, 19 16:20, there is a single negative point of Con with positives before and after it. This can cause issue when you have multiple series of such kind i.e. which one to stack above the other will be a question.

这篇关于Highcharts - 面积图 - 堆叠包含负值和正值的系列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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