Good day! There is a schedule

$(function() { $(document).ready(function() { $('#container').highcharts({ chart: { type: 'pie' }, plotOptions: { pie: { allowPointSelect: true, dataLabels: { enabled: false }, showInLegend: true } }, series: [{ name: "Brands", data: [{ name: "Safari", y: 4.77 }, { name: "Opera", y: 0.91 }, { name: "Proprietary or Undetectable", y: 0.2 }] }] }); }); }); 
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="http://code.highcharts.com/highcharts.js"></script> <div id="container"></div> 

, how can you call an alert (with a value) when you hover on a point in the legend?

    1 answer 1

    Element selection by hover

     (function (Highcharts) { var each = Highcharts.each; Highcharts.wrap(Highcharts.Legend.prototype, 'renderItem', function (proceed, item) { proceed.call(this, item); var isPoint = !!item.series, collection = isPoint ? item.series.points : this.chart.series, groups = isPoint ? ['graphic'] : ['group', 'markerGroup'], element = item.legendGroup.element; element.onmouseover = function () { each(collection, function (seriesItem) { if (seriesItem !== item) { each(groups, function (group) { seriesItem[group].animate({ opacity: 0.25 }, { duration: 150 }); }); } }); } element.onmouseout = function () { each(collection, function (seriesItem) { if (seriesItem !== item) { each(groups, function (group) { seriesItem[group].animate({ opacity: 1 }, { duration: 50 }); }); } }); } }); }(Highcharts)); 

    Taken from here http://jsfiddle.net/highcharts/Ha3Wr/ there can also be seen in the work.