0

I'm having trouble that i think relates to the "stacking" property of highcharts' area chart.

The thing is my values only go up to 120 max, but the Y column legend marks higher. Since i'm not being able to explain myself quite correctly i'll post the jsfiddle.

stacking:'normal',

http://jsfiddle.net/RFPUH/141/

As you can see there, the highest value i have is 120, but the Y column goes up until 210.. this is confusing and isn't good enough.

When i remove the "staking" property from the chart, the Y column problem disappears, but it doesn't work as desired either. I wanted to post a pic but i've no rep :(

stacking: null,

http://jsfiddle.net/RFPUH/142/

Does anyone know what im doing wrong??

thanks in advance guys!!!

Solution
http://jsfiddle.net/kfujdhou/3

4

1 回答 1

0

堆叠为您提供 Y 轴上“区域”类型的所有系列的总和。因此堆叠的行为应如此(在您的示例中,yMax=Min+Max ~200,JP 是一条线,不计入堆叠)。

你能描述一下想要的输出吗?

我想你会喜欢这样的东西:

series: [{
        name: 'JP',
        data: averages,
        zIndex: 1,
        marker: {
            fillColor: 'white',
            lineWidth: 2,
            lineColor: Highcharts.getOptions().colors[0]
        }
    }, {
        name: 'Range',
        data: ranges,
        type: 'arearange',
        lineWidth: 0,
        linkedTo: ':previous',
        color: Highcharts.getOptions().colors[0],
        fillOpacity: 0.3,
        zIndex: 0
    }]

http://jsfiddle.net/kfujdhou/

于 2014-09-22T17:22:14.560 回答