JSFiddle - React, Tailwind, and code Playground
by Kondal Durgam
HTML
<div id="container" style="min-width: 310px; max-width: 600px; height: 400px; margin: 0 auto;"></div>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
JavaScript
$(function() {
// Create the chart
chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'pie'
},
credits: {
enabled: false
},
exporting: {
enabled: false
},
title: {
text: 'Campaign Health'
},
yAxis: {
title: {
text: ''
}
},
plotOptions: {
pie: {
shadow: false
}
},
tooltip: {
formatter: function() {
return '<b>'+ this.point.name +'</b>: '+ this.y +' %';
}
},
series: [{
name: 'Browsers',
data: [["100% Met Targets",6],["Met Targets>75%",4],["Met Targets>75%",4],["'Met Targets<50%",7]],
size: '60%',
innerSize: '50%',
showInLegend:true,
dataLabels: {
enabled: false
}
}]
});
});