2016-10-29 21 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