删除 Flot 饼图中切片之间的白线 [英] Removing the white line between slices in Flot pie chart
本文介绍了删除 Flot 饼图中切片之间的白线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何去除Flot
中slices
和background
之间的白线
饼图代码>?
How can I remove the white line
between slices
and background
in Flot
pie chart
?
As you can see it looks like that:
I want it to look like that(Ignore my bad artistic skills):
My Code:
$(function () {
var data = [
{ label: "Read", data: 50, color: '#614E43' },
{ label: "Unread", data: 150, color: '#F5912D' }];
$.plot($("#star"), data,
{
series: {
pie: {
radius: 0.2,
innerRadius: 0.125,
show: true
}
}
});
});
解决方案
You can add the STROKE Property
pie: {
radius: 0.2,
innerRadius: 0.125,
show: true,
stroke: {
width: 0.1
}
}
Set the value to 0 totally hide the pie.
So you could also add a stroke color, with the value set to the same color as your background :
pie: {
radius: 0.2,
innerRadius: 0.125,
show: true,
stroke: {
width: 0.1,
color: '#808080'
}
}
See the Fiddle : http://jsfiddle.net/hSmVH/
这篇关于删除 Flot 饼图中切片之间的白线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文