Highcharts Demo
author(s): Torstein Hønsi
by Arvind Pal
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>
CSS
,
{ name: 'Discussion Forum', y: 22091}
{ name: 'DQ Operations', y: 16411 },
{ name: 'Data Consumer', y: 9069 },
{ name: 'Data Quality', y: 8658 },
{ name: 'Wiki ', y: 7007 },
{ name: 'Policy & Compliance ', y: 700 }
JavaScript
// Radialize the colors
Highcharts.setOptions({
colors: Highcharts.map(Highcharts.getOptions().colors, function (color) {
return {
radialGradient: {
cx: 0.5,
cy: 0.3,
r: 0.7
},
stops: [
[0, color],
[1, Highcharts.Color(color).brighten(-0.3).get('rgb')] // darken
]
};
})
});
// Build the chart
Highcharts.chart('container', {
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'pie'
},
title: {
text: 'Browser market shares in January, 2018'
},
tooltip: {
pointFormat: '<br>{point.name}: <b>{point.y}</b>',
headerFormat: '<small>{series.name}</small><table>',
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
format: '<b>{point.name}</b>: {point.y}',
style: {
color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
},
connectorColor: 'silver'
}
}
},
series: [{
name: 'Type',
data: [
{ name: 'Data Governance', y: 30177},
{ name: 'Discussion Forum', y: 22091},
{ name: 'DQ Operations', y: 16411 },
{ name: 'Data Consumer', y: 9069 },
{ name: 'Data Quality', y: 8658 },
{ name: 'Wiki ', y: 7007 },
{ name: 'Policy & Compliance ', y: 700 }
]
}]
});