2016-10-29 19 views
0

我摆脱了我所做的高图的周围阴影后,目前有一个影像,如果在这个图像中盘旋在饼图区域:如何从高地图上悬停时删除外部影子JAVASCRIPT

我也是在饼图中心获得文本后。

Example

下面是代码:

$(function() { 
    // Create the chart 
    Highcharts.setOptions({ 
    colors: ['#26d248', '#323232'] 
}); 

    chart = new Highcharts.Chart({ 
     chart: { 
      renderTo: 'summoner-pie-container', 
      type: 'pie', 
      backgroundColor:'transparent' 

     }, plotOptions: { 

     series: { 
      marker: { 
       states: { 
        hover: { 
         enabled: false 
        } 
       } 
      } 
     }, 

     pie: { 
      borderWidth: 0 
     } 
    }, 


     title: { 
text: '', 
style: { 
    display: 'none' 
} 
}, credits: { 
    enabled: false 
}, exporting: { 
    buttons: { 
     contextButton: { 
      enabled: false 
     }  
    } 
}, 
tooltip: { 
      formatter: function() { 
       return '<b>'+ this.point.name +'</b>: '+ this.y; 
      } 
     }, 
     series: [{ 
      data: [["Damage Dealt",34000],["Team Damage Dealt",86423]], 
      size: '60px', 
      innerSize: '70%', 
      dataLabels: { 
       enabled: false 
      } 
     }] 
    }); 


    }); 

http://jsfiddle.net/HpdwR/1994/

回答

1

在你的提示设置:

tooltip: { 
    formatter: function() { 
     return '<b>'+ this.point.name +'</b>: '+ this.y; 
    } 
}, 

您需要添加shadow: false

tooltip: { 
    formatter: function() { 
     return '<b>'+ this.point.name +'</b>: '+ this.y; 
    }, 
    shadow: false 
} 

而且,在你plotOptions你需要在对象基本上去除层,像这样:

plotOptions: {   
    series: { 
     states: { 
      hover: { 
       enabled: false 
      } 
     } 
    }, 

(Working Fiddle)

+1

应该阴影后'删除逗号:假的,'虽然 - Internet Explorer绊倒它并抛出错误IIRC。 – CBroe

+0

不起作用它仍然有它周围的阴影悬停 – ForsakenHound

+0

斑点的CBroe; @ForsakenHound,也许尝试没有我在'shadow:false'(我现在已经移除)后意外添加的逗号? – amdouglas