Pie Chart Links for Highcharts.js

I would like the user to be directed to a specific part of the page when they click on the pie chart section. I get an error {"error": "Please use POST request"}when clicked.

http://jsfiddle.net/alliwagner/Saa4E/10/

At the moment, the blue section should go to "Commodity Products" when clicked.

Any help at all would be appreciated.

+5
source share
2 answers

Here is the update of your jsfiddle.

The changes I had to make were as follows:

  • "click" this , . URL-, "config" 2 .
  • this , - .
  • "preventDefault()" , .
+8

, , 3 Highcharts

series: [{
    type: 'pie',
    name: 'overall',
    point: {
        events: {
            click: function(e) {
                location.href = e.point.url;
                e.preventDefault();
            }
        }
    },
    data: [
        {name: 'Not Tested', color: '#FFA850', y: 87, url: 'http://my_site1.com'},
        {name: 'Fail', color: '#FF2929', y: 2, url: 'http://my_site2.com'},
        {name: 'Pass', color: '#31FF4F', y: 32, url: 'http://my_site3.com'}
    ]
}]
+4

All Articles