Drilling down for data with the point click event

So far we have only fiddled with the top countries ordered by gold medals. Let's see how we can use a Highcharts event to navigate around other charts in jQuery Mobile. Back with the pageinit handler code for chart_page, we declared the pointEvt variable, which is a click event handler shared by all the series in gold medal charts. The following code is for the event:

 var pointEvt = {
     events: {
         click: function(evt) {
             document.location.href = './sport.html?country=' 
             // Country code or name
             + encodeURIComponent(this.category) + 
             // Medal color
             '&color=' + this.series.name;
         }
     }
 };

This event is triggered by touching a bar in a column chart or a slice in a pie chart. As a result, it loads a new document ...

Get Learning Highcharts 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.