ElementStacks
HTML
<script src="http://highcharts.com/js/testing.js"></script>
<div id="container" style="height: 400px; width: 500px"></div>
JavaScript
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'pie'
},
plotOptions: {
pie: {
showInLegend: true,
dataLabels: {
formatter: function() {
if(this.y === 0)
return '';
return Math.round(this.percentage) + '%';
}
},
point: {
events: {
legendItemClick: function() {
if (this.visible) {
this['y_old'] = this.y;
this.update(0);
}
else
this.update( this.y_old );
}
}
}
}
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0]
}]
});