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

onzinsky
  • 541
  • 1
  • 6
  • 21

1 Answers1

0

stacking gives you the sum of all series of the type "area" on the Y axis. so the stacking behaves as it should (yMax=Min+Max ~200 in your example, JP is a line and not counted towards the stacking).

Could you describe the desired output?

I suppose you would like something like this:

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/

schangli
  • 171
  • 7
  • yes, i want the Y axis to be no more than 10 "points" more than my maximum value, and the area painted to be just the part inside the two gray lines. as you can see in the second example, the area painted goes until the 0 of the Y axis I dont know if im explaining myself. in that case tell me thanks! – onzinsky Sep 22 '14 at 18:49
  • I hope my example helps you :) – schangli Sep 22 '14 at 19:27
  • thanks !! it did help! I was getting it wrong, but now i got it right thanks to you. I just added a couple of lines, but it was perfect. http://jsfiddle.net/kfujdhou/3 Once again, thank you! – onzinsky Sep 23 '14 at 08:54