2014-07-17 19 views
0

我使用flot圖表(http://flotcharts.org)在我的應用程序中構建圖形,但遇到了一個問題,我無法在任何地方找到解決方案。 points.show:false屬性似乎不工作,而lines.show:false工作得很好。浮點圖points.show:false不起作用

我使用flot tooltip(https://github.com/krzysu/flot.tooltip)插件來顯示懸停點上的點數據。

這裏是我的代碼的一部分:

options = { 
     series: { 
      points: { 
      show: false, 
      lineWidth: 1, 
      fill: true, 
      fillColor: false, 
      symbol: "circle", 
      radius: 2 
      }, 
      lines: { 
      show: false 
      }, 
      splines: { 
      show: true 
      } 
      shadowSize: 5 

     }, 
     legend:{ 
      container:$("#legendContainer") 
     }, 
     grid: { 
      hoverable: true, 
      clickable: false, 
      show: true, 
      backgroundColor: { colors: ["#f9f9f9","#ffffff"]} 
     }, 
     colors:["#f63131","#f0cd48","#7ef048","#4888f0","#a84ad6","#ffa500"], 
     tooltip: true, 
     tooltipOpts: { 
      defaultTheme: false, 
      content: "%s <br> %x <br>%y" 
     }, 
     xaxis: 
      { 
      mode: "time", 
      minTickSize: [1, "day"], 
      max: (new Date()).getTime(), 
      min: minDate 
      }, 
     yaxes:[ 
      { ticks: [] }, 
      { ticks: [] }, 
      { ticks: [] }, 
      { ticks: [] }, 
      { ticks: [] } 
     ] 

     }; 

回答

3

points: { 
     show: false 
} 

控制是否點在圖形和it works just fine with your options繪製。

我相信你所指的「點」是當你將鼠標懸停在劇情上時,它突出顯示了你已經完成的點。 To disable that,設爲:

grid: { 
    autoHighlight: false 
} 
+0

是的,但是當我用花鍵,工具提示不會當points.show設置爲false工作。 :( –

+0

@SambhavSharma,因爲這超出了這個問題的範圍,請打開一個新的相關細節,我會看看。 – Mark