Simple pie charts
by Angelos Chaidas
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="width: 140px; height: 140px; margin: 0 auto"></div>
JavaScript
$(function () {
var chart;
$(document).ready(function () {
$('#container').highcharts({
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false
},
credits: {
enabled: false
},
title: {
text: ''
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: false
},
// showInLegend: true
}
},
series: [{
type: 'pie',
data: [
['All UK jobs', 80.0], {
name: 'Your jobs',
y: 20,
sliced: true,
selected: true
}]
}]
});
});
});