如何创建的线来显示条形图阈

问题描述:

我使用海军报等如何创建的线来显示条形图阈

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

似乎有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