ElementStacks
HTML
<script src="http://highcharts.com/js/testing.js"></script>
<div id="container" style="height: 400px; width: 500"></div>
<button id="reset">Reset</button>
JavaScript
var data = [
['Firefox', 44.2],
['IE7', 26.6],
['IE6', 20],
['Chrome', 3.1],
['Other', 5.4]
];
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'pie'
},
plotOptions: {
pie: {
point: {
events: {
legendItemClick: function(eventArgs) {
this.remove(); // Remove the point
eventArgs.preventDefault(); // Prevent the default behavior
}
}
},
showInLegend: true
}
},
series: [{
data: data
}]
});
$('#reset').click(function () {
chart.series[0].setData(data);
});