JSFiddle - React, Tailwind, and code Playground
by GRMule
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
JavaScript
$(function () {
$('#container').highcharts({
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false
},
title: {
text: 'Browser market shares at a specific website, 2014'
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
format: '<b>{point.name}</b>: {point.percentage:.1f} %',
style: {
color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
}
}
}
},
series: [{
type: 'pie',
name: 'percent of all donations',
data:[["3 donations",10.337698139214],["15 donations",0.51688490696072],["16 donations",0.1837813002527],["2 donations",14.013324144268],["6 donations",6.8917987594762],["8 donations",4.2269699058121],["31 donations",0.3560762692396],["5 donations",8.9019067309901],["9 donations",3.618194348725],["1 donations",24.270617964622],["4 donations",9.9241902136458],["14 donations",0.64323455088445],["12 donations",1.5161957270848],["11 donations",2.4006432345509],["18 donations",0.20675396278429],["10 donations",4.1350792556857],["7 donations",5.4674936825178],["21 donations",0.24121295658167],["24 donations",0.27567195037905],["13 donations",1.1945784516425],["17 donations",0.19526763151849],["19 donations",0.21824029405008],["23 donations",0.26418561911326]]
}]
});
});