我使用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