JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="width: 400px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function () {
var chart;
$(document).ready(function () {
// Build the chart
chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
marginTop: 20,
marginRight: 10,
marginLeft: 10,
marginBottom: 20
},
title: {
text: ''
},
tooltip: {
enabled: false,
},
colors: [
'#aed741',
'#bedd17',
'#c3e171',
'#85b501',
'#9ed800',
'#DB843D',
'#92A8CD',
'#A47D7C',
'#B5CA92'
],
legend: {
itemStyle: {
cursor: 'pointer',
color: '#545454'
},
itemMarginTop: 10,
itemMarginBottom: 10,
borderWidth: 2,
borderColor: '#dadada',
backgroundColor: '#ffffff',
enabled: false
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
borderColor: '#d6d6d6',
borderWidth: 2,
padding: 5,
borderRadius: 5,
color: '#333333',
formatter: function() {
return '<b>'+ this.point.name +'</b>: '+ this.point.y;
}
},
showInLegend: true,
innerSize: '40%',
size: '75%',
shadow: false,
...