2015-11-27 41 views
3

當圖形重新繪製(縮放或調整大小)時,Y軸值會發生變化(最大值發生變化),在圖形的頂部會留下大的白色間隙(無數據)。Highcharts - 在重繪時停止Y軸值更改

這是JsFiddle的問題(包含真假數據,結果相同)和一些pictures of my actual graph

這些都是我該圖表選項:

var chartOptions = { 
    title: false, 

    xAxis: { 
     lineWidth: 0, 
     type: 'datetime' 
    }, 

    yAxis: [{ 
     lineWidth: 0, 
    }, 
    { 
     lineWidth: 0, 
     opposite: true,  
    }], 

    tooltip: { 
     shared: true 
    }, 

    series: [{ 
     name: 'A', 
     yAxis: 0, 
     type : "area", 
    }, 
    { 
     name: 'B', 
     yAxis: 1, 
     type : "area", 
    }, 
    { 
     name: 'C', 
     type : "spline", 
     yAxis: 0, 
    }], 

    plotOptions: { 
     area: { 
      threshold: null 
     }, 
    }, 

    chart: { 
     zoomType: 'x', 

    }, 

    legend: { 
     enabled: false 
    }, 
}; 
+0

您可以將alignTicks設置爲false。例如:http://jsfiddle.net/b1vrvn2q/9/ –

+2

哇@SebastianBochan這正是我所尋找的!謝謝一堆!請考慮回覆,我會接受你的答案,因爲它在我的情況是現貨:) –

回答