January 2015
Intermediate to advanced
478 pages
10h 7m
English
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 ...
Read now
Unlock full access