score:29

Accepted answer

you want the event handling on the point config, not the series. each wedge is a point in a single series:

   var data = [{ name: 'one', y: 10, id: 0 },{ name: 'two', y: 10, id: 1 }];

   // some other code here...

   series:[
      {
         "data": data,
          type: 'pie',
          animation: false,
          point:{
              events:{
                  click: function (event) {
                      alert(this.x + " " + this.y);
                  }
              }
          }          
      }
   ],

fiddle here.

full running code:

var chart;
point = null;
$(document).ready(function () {

    var data = [{ name: 'one', y: 10, id: 0 },{ name: 'two', y: 10, id: 1 }];
    
    chart = new highcharts.chart(
    {
       series:[
          {
             "data": data,
              type: 'pie',
              animation: false,
              point:{
                  events:{
                      click: function (event) {
                          alert(this.id);
                      }
                  }
              }          
          }
       ],
       "chart":{
          "renderto":"container"
       },
    });
});
<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" style="width: 320px; height: 200px"></div>


Related Query

More Query from same tag