2011-09-01 80 views

回答

14

您可以使用“网格”属性的“标记”属性在该线的任一侧具有不同的颜色。例如编辑您的jsfiddle说:

grid: { 
     backgroundColor: 
     { 
      colors: ["#FFF", "#DDD"] 
     }, 
     markings: [ 
      {xaxis: {from: 1, to: 10}, yaxis: {from: -3, to: 12}, color: "#eeeeff"}, 
      {xaxis: {from: 10, to: 14}, yaxis: {from: -3, to: 12}, color: "#eeffee"}, 
      {xaxis: {from: 10, to: 10},       color: "#0000bb"} 
     ] 
    }, 

你也可以用它来画一个简单的线条第三个“x轴”上面,而不是做它,你没有(其他系列)的方式。

+0

谢谢!我可以用这个工作! – 321X

+0

你能帮我在这个问题请http://stackoverflow.com/questions/25349545/flot-jquery-is-it-possible-to-draw-this-kind-of-chart –