Skip to content Skip to sidebar Skip to footer

Disable Hover On Special Slice Of Pie Chart

I know how to disable hover on highcharts, and I edit the answer to disable hove on special slice as this demo, but it doesn't work. I edit series attribute as the following: seri

Solution 1:

You were pretty close with your custom tooltip property idea. I personally rather using custom names as well, therefor instead of adding a tooltip data object, i'd use a custom property named tooltipDisabled:

{name: 'Other', y: 35, tooltipDisabled:true} // second half of pie

And then, using a tooltip formatter function (a callback function called when a point is hoverd, which is totally override-able), I'd discriminate the points with this property:

    tooltip: {
        useHTML:true,
        formatter: function(){
            returnthis.point.tooltipDisabled ? false : this.point.name +"<br><span style='font-size:18px;vertical-align:middle'>&#8226;</span>"+this.series.name+": <b>"+this.y+"</b>";
        }

returning false, as you have probably guessed, disables the tooltip. (as you can see I also added useHTML:true, so highcharts renders the bullet next to the point name.

See fiddle: http://jsfiddle.net/e7brd9do/2/

Post a Comment for "Disable Hover On Special Slice Of Pie Chart"