2012-02-01 30 views
0

我使用海軍報等如何創建的線來顯示條形圖閾

Bar Graph

我需要指定等在750(y軸)例如的線的閾值,以創建柱狀圖,以顯示限制... flot包中有一個jquery.flot.threshold.js文件,但我不知道如何在條形圖上使用它。怎麼做?

+0

海軍報哪個版本您使用的? – 2012-02-01 16:26:48

+0

最新版本0.7兄弟... – 2012-02-02 06:04:38

回答

4

似乎有some issues與當前flot發行版本使用閾值插件。如果你只是想紀念閾值,它可能是更容易使用網格標記選項:

$.plot($("#placeholder"), [ d1, d2, d3 ], { 
    series: { 
     stack: true,  
     bars: { show: true, barWidth: 0.6 } 
    }, 
    grid: { 
      markings: [ { xaxis: { from: 0, to: 12 }, yaxis: { from: 0, to: 20 }, color: "#6D7B8D" }] 
     } 
}); 

主要生產(小提琴here):

enter image description here

+0

根據你連接到的問題,這應該在0.7。 – 2012-02-01 16:27:29

+0

從更改日誌看起來像0.7發佈於2011年3月21日,並且這是固定2011年4月4日。 – Mark 2012-02-01 16:49:42

+0

感謝馬克.... :) – 2012-02-02 06:01:21