我使用jquery flot作爲我的餅圖,並且當餅圖塊非常小時,我遇到了重疊 標籤的問題。有沒有很好的 解決方案?flot餅圖中的重疊標籤
我的餅圖:
series: {
pie: {
show: true,
radius: 1,
label: {
show: true,
radius: 5/8,
formatter: function(label, series){
return '<div style="font-size:12pt;text- align:center;padding:2px;color:black;margin-left:-80%;margin- top:-20%;">'+label+'<br/>'+Math.round(series.percent)+'%</div>';
},
background: { opacity: 0.5 }
}
}
},
legend: {
show: false
}
感謝,Arshavski亞歷山大。
這是2015年,我正面臨與Flot同樣的問題。你的解決方案很好,但我通過涼亭安裝lib。似乎不是一個好主意來修補源代碼。 – 2015-08-19 13:38:44
這是2017年,它的工作。我在 https://jsfiddle.net/shizus/1j4djqLx/2/中留下了一個例子,想知道爲什麼他們沒有修正這個問題? – 2017-08-08 21:03:11