Highcharts Demo
author(s):
Torstein Hønsi
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="height: 400px"></div>
<button id="button">Slice</button>
JavaScript
$(function () {
$('#container').highcharts({
chart: {
type: 'pie'
},
plotOptions: {
series: {
cursor: 'pointer',
point: {
events: {
click: function() {
//location.href = this.options.url;
alert(this.options.type);
}
}
}
}
},
series: [{
data: [{
y: 29.9,
url: 'http://bing.com/search?q=foo',
type: 'success'
}, {
y: 71.5,
url: 'http://bing.com/search?q=bar',
type: 'fail'
}, {
y: 106.4,
url: 'http://bing.com/search?q=foo+bar',
type: 'in-Progress'
}]
}]
});
// button handler
$('#button').click(function() {
var chart = $('#container').highcharts();
chart.series[0].data[0].slice();
});
});