Highcharts Demo
author(s): Torstein Hønsi
by Amit Sinha
HTML
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<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
// Build the chart
Highcharts.chart('container', {
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'pie'
},
credits:{
enabled: false
},
title: {
text: 'NEW VULNERABILITIES WITH RISK SCORE > 7'
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
formatter:function() {
var getCount = this.point.y;
return getCount;
}
},
showInLegend: true
}
},
series: [{
name: 'Brands',
colorByPoint: true,
data: [{
name: 'Nessus',
y: 10
}, {
name: 'Qualys',
y: 4
}, {
name: 'Nexpose',
y: 4
}, {
name: 'Croudstrike',
y: 7
}]
}]
});