score:1

Accepted answer

Well, threshold should work. Just you need to set

  • endOnTick: false
  • maxPadding: 0
  • threshold: max_value_in_data

See: http://jsfiddle.net/3bQne/1076/

Code:

var data = [3, 4, 3, 5, 4, 10, 12];

Array.prototype.max = function() {
    return Math.max.apply(null, this);
}

$('#container').highcharts({
    chart: {
        type: 'areaspline'
    },
    yAxis: {
        endOnTick: false,
        maxPadding: 0
    },
    plotOptions: {
        areaspline: {
            threshold: data.max(),
        }
    },
    series: [{
        data: data,
        negativeFillColor: 'rgba(255, 0, 0, 0.5)'
    }]
});

Related Query

More Query from same tag