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

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

问题描述

如何移除切片和之间的白线 $ c> Flot 饼图

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

a href =http://jsfiddle.net/canttouchit/6hHDt/1/ =nofollow noreferrer>我的jsfiddle

My jsfiddle

您可以看起来像这样:

我想让它看起来像这样(忽略我的坏艺术技能):

I want it to look like that(Ignore my bad artistic skills):

我的代码: / p>

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
          }
        }
      });
});


推荐答案

您可以添加STROKE属性

You can add the STROKE Property

pie: {               
  radius: 0.2,  
  innerRadius: 0.125,
  show: true,
  stroke: { 
      width: 0.1
  }
}

该值为0完全隐藏饼图。

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'
    }
}

查看小提琴: http://jsfiddle.net/hSmVH/

这篇关于删除Flot饼图中切片之间的白线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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