2012-05-29 84 views
8

jqPlot pieRenderer傳奇廣場我正在jqPlot出於某種原因,顏色編碼的方塊應該顯示出來的餡餅渲染的傳奇裏面沒有出現。我想知道它是否與我使用twitter bootstrap的事實有關?我沒有使用任何其他的CSS庫。沒有顯示

 var plot1 = jQuery.jqplot('chartdiv', [graphData], 
     { 
      grid: { 
       shadow: false, 
       background: '#FFFFFF',                       
      }, 
      seriesDefaults: { 
       // Make this a pie chart. 
       renderer: jQuery.jqplot.PieRenderer, 
       rendererOptions: { 
        // Put data labels on the pie slices. 
        // By default, labels show the percentage of the slice. 
        showDataLabels: true, 
        padding: 20, 
        startAngle: 270 
       } 
      }, 
      legend: { 
       show: true, 
       location: 'e', 
       fontSize: 11, 
       marginTop: 10,         
      } 
     }); 

回答

18

你確定正確裝入jqPlotCSS(即URL/href是指向正確的位置)?

This is your code with jquery.jqplot.css loaded.

This is your code without the css.

This one is with both the jquery.jqplot.css and the bootstrap (downloaded without jQuery plugins and not linking the img folder that comes with the download).這裏所有正確顯示。因此你必須仔細檢查jquery.jqplot.css的href

+1

萬分感謝!就是這樣。 –

+1

非常感謝!這樣做了,我的圖形看起來好多了! – Lukas

+1

工作就像一個魅力...... – Gowri