2014-06-05 205 views
0

我找不出爲什麼yaxis標籤不顯示。我正在使用Mark Cote的jquery.flot.axislabels.js。有人能幫我看看下面的代碼嗎?Flot yaxis標籤不顯示

options = { 
    series: { 
     lines: { show: true, lineWidth: 1 }, 
     points: { show: pshow, radius: 2 }, 
     color: cnum 
    }, 
    legend: { 
     position: "nw", 
     backgroundOpacity: 0.5 
    }, 
    xaxis: { 
     mode: "time", 
     timeformat: timeformat, 
     timezone: "utc" 
    }, 
    yaxis: { 
     ticks: 15, 
     tickDecimals: 3, 
     minTickSize: 1, 
     axisLabel: 'Milliseconds', 
     axisLabelPadding: 10, 
     axisLabelFontFamily: 'Verdana, Arial', 
     axisLabelFontSizePixels: 10 
    }, 
    grid: { hoverable: true }, 
    tooltip: true, 
    tooltipOpts: { 
     content: "%x.1 - %y.4", 
     shifts: { x: -60, y: 25 } 
    }, 
    selection: { mode: "xy" } 
}; 

var plot = $.plot(placeholder, rdata.data, options); 

「rdata.data」包含多個系列。我試圖只繪製一個,它沒有幫助。

+1

你可以創建一個[JSFiddle](http://jsfiddle.net/)來複制這個問題嗎? – mechenbier

+1

你的代碼適用於我:http://jsfiddle.net/ax6wW/1/,你必須重現它。 – Mark

回答

0

謝謝你們。我解決了這個問題。我有插件如下,這導致了問題。

<script type='text/javascript' src='../js/flot/jquery.flot.axislabels.js'></script> 
<script type='text/javascript' src='../js/flot/jquery.flot.js'></script> 

只要我擺動訂單,它的工作很精美。