Highcharts Doughnut - with center number
Normal Highchart pie with inner circle, title then plotted into that hole.
by andy troy
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="extra_data">1234</div>
<div id="container" style="min-width: 150px; height: 300px; max-width: 300px; margin: 0 auto"></div>
JavaScript
$(function () {
var cfg= {
chart: {
plotBackgroundColor: null,
plotBorderWidth: 0,
plotShadow: false
},
plotOptions: {
pie: {
tooltip:{
pointFormatter: function(){
debugger;
}
}
}
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
series: [{
type: 'pie',
name: 'Browser share',
innerSize: '70%',
data: [
['Firefox', 45.0],
['IE', 26.8],
['Chrome', 12.8],
['Safari', 8.5],
['Opera', 6.2]
]
}]
};
var theme = {
title: {
text: 'Browser<br>shares',
align: 'center',
verticalAlign: 'middle',
y: 0
}
}
var cc = $('#container').highcharts(Highcharts.merge(cfg,theme));
});