Highcharts Demo
author(s): Torstein Hønsi
by Umair Rafiq
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
JavaScript
// Build the chart
Highcharts.chart('container', {
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'pie'
},
title: {
text: ''
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: false,
format: '{point.percentage:.1f} %',
distance: -10,
filter: {
property: 'percentage',
operator: '>',
value: 4
}
}
}
},
series: [{
name: 'Share',
data: [
{ name: 'Very High', y: 61.41,color:'#edf3ee', borderColor: '#72b77d' },
{ name: 'High', y: 11.84,color:'#e0f3e3', borderColor: '#36cb4c' },
{ name: 'Nuetral', y: 10.85,color:'#f9f1e4', borderColor: '#feb024' },
{ name: 'Low', y: 4.67,color:'#f3e2e2', borderColor: '#d36668' },
{ name: 'Very Low', y: 4.18,color:'#ddaaaa', borderColor: '#961c1e' }
],
innerSize: '70%'
}]
});