JSFiddle - React, Tailwind, and code Playground
by stuarthwoods
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 () {
$(document).ready(function () {
// Build the chart
$('#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: false
},
showInLegend: true
}
},
series: [{
type: 'pie',
name: 'Browser share',
data: [
['Firefox', 36.2],
['IE', 23.6],
{
name: 'Chrome',
y: 14.5,
sliced: true,
selected: true
},
['Safari', 9.6],
['Opera', 15.0],
['Others', 1.1]
], colors: ['#F78900', '#7EAEE8','#A953C2','#0CA016','#15487A','#F2C689']
}]
});
});
});