jquery - 删除 Flot 饼图中切片之间的白线

标签 jquery jquery-plugins charts flot pie-chart

如何删除Flot 饼图切片背景之间的白线/

My jsfiddle

正如你所看到的,它看起来像这样:

White line

我希望它看起来像那样(忽略我糟糕的艺术技巧):

enter image description here

我的代码:

$(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 属性

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

将值设置为 0 完全隐藏饼图。

因此,您还可以添加描边颜色,并将值设置为与背景颜色相同:

pie: {
    radius: 0.2,
    innerRadius: 0.125,
    show: true,
    stroke: {
        width: 0.1,
        color: '#808080'
    }
}

参见 fiddle :http://jsfiddle.net/hSmVH/

关于jquery - 删除 Flot 饼图中切片之间的白线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18784246/

相关文章:

javascript - 将顺序 jQuery 选择器组合成单个函数

javascript - php javascript中的多折线图

jquery-ui - $.Ajax 使用 jquery 发送进度条

jquery dotdotdot 插件(添加省略号)不适用于 Bootstrap 轮播

javascript - 防止jquery原型(prototype)/插件方法之间的冲突

javascript - Chart JS — 条件水平行背景色

jquery - 使用 Chart.js 将数据添加到折线图

javascript - 请解释一下这个 jQuery 函数

php - 按钮上的 AJAX 功能第一次点击后不运行 PHP

javascript - 添加产品后更新 Woocommerce 购物车 (jQuery)