如何删除晕和Highcharts饼图之间的细白线 [英] How to remove fine white line between halo and Highcharts pie chart

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

问题描述

解决方案

在SVG中是抗锯齿的。您可以使用形状渲染 CSS选项来使用不同的选项: http://jsfiddle.net/0bpkrnd3/5/( crispEdges 看起来更糟糕))



无论如何,你可以使用另一个解决方案,而不是 halo 。只需禁用 halo 并使用 point.events 更改切片的半径:
http://jsfiddle.net/0bpkrnd3/6/



p>

 点:{
events:{
mouseOver:function(){
this.graphic。 attr({
r:this.shapeArgs.r + 10
});
},
mouseOut:function(){
this.graphic.attr({
r:this.shapeArgs.r
});
}
}
},


http://jsfiddle.net/0bpkrnd3/4/ demonstrates that there is a very fine white line between the hover halo of a Highcharts pie chart and the pie segment. The halo color is as the same as the hover color and its stroke width is 0.

pie: {
  shadow: false,
    borderWidth: 0,
    states: {
    hover: {
      color: '#ff7f00',
        brightness: 0,
        lineWidth: 0,
        halo: {
        size: 9,
          opacity: 1,
          attributes: {
          fill: '#ff7f00',
            'stroke-width': 0
        }
      }

    }
  }
}

解决方案

This is anty-aliasing in SVG. You can play around with different options using shape-rendering CSS option: http://jsfiddle.net/0bpkrnd3/5/ (crispEdges looks even worse ;) )

Anyway, there is another solution you can use, instead of halo. Simply disable halo and use point.events to change radius of the slice: http://jsfiddle.net/0bpkrnd3/6/

Code:

    point: {
      events: {
        mouseOver: function() {
          this.graphic.attr({
            r: this.shapeArgs.r + 10
          });
        },
        mouseOut: function() {
            this.graphic.attr({
            r: this.shapeArgs.r
          });
        }
      }
    },

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

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