2013-07-02 160 views
2

我跟着另一個問題的答案,並絕對確定jquery.jqplot.css已包含在內,但仍無法顯示顏色。我嘗試了很多rendereres(默認,酒吧,漏斗),並沒有一個工作。我甚至嘗試過使用增強的圖例渲染器無濟於事。圖例顏色不顯示

這是我用來呈現圖表的代碼。除了圖例外,所有內容都可以顯示

plot2 = $j.jqplot('chart_palnie', [serie], { 
seriesDefaults: { 
    renderer:$j.jqplot.FunnelRenderer, 
    rendererOptions:{ 
     sectionMargin: 8, 
     widthRatio: 0.3, 
     showDataLabels: true, 
     dataLabels: serie_labeluri, 
     dataLabelThreshold: 0 
     //dataLabelFormatString: '%s, %d' 
    } 
}, 
legend: { 
    show:true, 
    location: 'e', 
    showLabels: true, 
    showSwatch: true 
} 
}); 

回答

1

嘗試添加展示位置選項。我還包括renderOptions,但這主要是針對IE支持的情況。

legend: { 
      show: true, 
      location: 'n', 
      placement: 'inside', 
      renderer: $.jqplot.EnhancedLegendRenderer, 
      rendererOptions: { 
       numberRows: 1, 
       disableIEFading: true 
      } 
     } 
+1

剛剛試了一下,沒有骰子。 – Bogdan

+0

同樣在這裏......擁有完全相同的問題。 –

4

包括CSS文件jquery.jqplot.css ..這解決了我