删除 Flot 饼图中切片之间的白线 [英] Removing the white line between slices in Flot pie chart

查看:16
本文介绍了删除 Flot 饼图中切片之间的白线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何去除Flotslicesbackground之间的白线 饼图?

How can I remove the white line between slices and background in Flot pie chart?

My jsfiddle

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆