Highcharts垂直堆叠条形图与负值,是可能吗? [英] Highcharts vertical stacked bar chart with negative values, is it possible?
问题描述
是否可以使用带负值的垂直堆叠条形图(使用highcharts)。
Is it at all possible to be able to have a vertically stacked bar chart with negative values (using highcharts).
series: [{
name: 'John',
data: [5, -3, 4, 7, 2]
}, {
name: 'Jane',
data: [2, 2, -31, 2, 1]
}, {
name: 'Joe',
data: [3, 4, 4, 2, 5]
}]
$ b b
不幸的是负值没有注册。
Unfortunately negative values don't register.
This seems to be a solution: http://jsfiddle.net/gh/get/jquery/1.9.1/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/bar-negative-stack/
但是出于视觉的原因,我需要垂直的酒吧。
But for visual reasons I need the bars to be vertical.
非常感谢任何解决方案。
Any thoughts on a fix would be greatly appreciated!
感谢,
汤姆
推荐答案
试图实现相同的结果。检查这个小提琴,让我知道=]
我使用:
I was trying to achieve the same results. Check this fiddle and let me know =] I used:
chart: {
type: 'column'
},
plotOptions: {
series: {
stacking: 'normal'
}
}
编辑:尝试将类型更改为bar。这将使图表列横向=]
try changing the type to 'bar'. This will make the chart "columns" go horizontal =]
jsFiddle for horizontal stacked bars w negatives
这篇关于Highcharts垂直堆叠条形图与负值,是可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!