Highcharts Demo
author(s): Torstein Hønsi
by praveen_kr
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
JavaScript
Highcharts.chart('container', {
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'pie'
},
title: {
text: 'Headcount',
verticalAlign: 'middle'
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
connectorPadding:0,
dataLabels: {
distance:-10,
enabled: true,
format: '<b>{point.name}</b>: {point.percentage:.1f} %',
style: {
color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
}
}
}
},
series: [{
name: 'Brands',
colorByPoint: true,
size:'100%',
innerSize:'80%',
data: [{
name: 'US',
y: 80
}, {
name: 'Asia Pacific',
y: 10
}, {
name: 'EMEA',
y: 10
}]
},
{
name: 'Brands2',
colorByPoint: true,
size:'60%',
innerSize:'50%',
data: [{
name: 'US',
y: 50
}, {
name: 'Asia Pacific',
y: 20
}, {
name: 'EMEA',
y: 30
}]
}
]
});