2013-02-27 68 views
0

見下圖;目標是去除標籤的背景(即透明背景)。我一直在向上和向下的jqPlot文件和API,嘗試的設置的各種組合......甚至試圖覆蓋什麼,我認爲是源CSS類:jqPlot餅圖 - 刪除數據標籤的背景

jqPlot Pie Chart

的一點是,這只是當我嘗試呈現餅圖時發生......任何其他類型的圖表都會自動顯示沒有背景的標籤。這裏是我的代碼的基礎迭代,從所有的實驗清理:

相關的包括:

// excanvas.js 
// jquery.jqplot.min.js 
// plugins/jqplot.pieRenderer.min.js 
// jquery.jqplot.css 

JQ:

$.jqplot('PIE', [[["CE",14],["CNB",0],["CD",10],["BD",197],["PD.",9],["AO",68]]], 
{ 
grid: 
    { 
    drawBorder:false, 
    shadow:false, 
    }, 
gridPadding:{top:0,right:0,bottom:0,left:0}, 
seriesColors:[\"#2D8659\",\"#862D2D\",\"#2D8686\",\"#2D2D86\",\"#59862D\",\"#B4B43C\"], 
legend:{show:true}, 
seriesDefaults: 
    { 
    renderer:$.jqplot.PieRenderer, 
    rendererOptions: 
     { 
     showDataLabels:true, 
     dataLabelPositionFactor:.75, 
     shadowOffset:0, 
     lineWidth:3, 
     sliceMargin:4, 
     startAngle:-90, 
     highlightMouseOver:false, 
     padding:10 
     } 
    } 
}); 

預先感謝所有幫助的答覆!

回答

1

看到這個

它的工作原理

FIDDLE

代碼

$.jqplot('pieChart', [[["CE",14],["CNB",0],["CD",10],["BD",197],["PD.",9],["AO",68]]], 
{ 
grid: 
    { 
    drawBorder:false, 
    shadow:false 

    }, 
gridPadding:{top:0,right:0,bottom:0,left:0}, 
seriesColors:["#2D8659","#862D2D","#2D8686","#2D2D86","#59862D","#B4B43C"], 
legend:{show:true}, 
seriesDefaults: 
    { 
    renderer:$.jqplot.PieRenderer, 
    rendererOptions: 
     { 
     showDataLabels:true, 
     dataLabelPositionFactor:.75, 
     shadowOffset:0, 
     lineWidth:3, 
     sliceMargin:4, 
     startAngle:-90, 
     highlightMouseOver:false, 
     padding:10 
     } 
    } 
}); 
+0

IT肯定不會。謝謝先生 - 您已經間接幫助我解決問題!我們之前的編輯器全局設置所有的DIV都有#FFF背景......在我看到示例中的CSS之前,我無法弄清楚。 – 2013-02-27 03:07:52