JSFiddle - React, Tailwind, and code Playground
by Sanjay
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function () {
$('#container').highcharts({
chart: {
type: 'bar'
},
title: {
text: 'Historic World Population by Region'
},
xAxis: {
categories: ['Africa', 'America', 'Asia', 'Europe', 'Oceania'],
title: {
text: null
}
},
yAxis: {
min: 0
},
plotOptions: {
bar: {
dataLabels: {
enabled: true
}
}
},
series: [{
name: 'Year 1800',
stack: 0,
pointPadding: -0.3,
pointPlacement: 0.10,
data: [107, 31, 635, 203, 102]
}, {
name: 'Year 1900',
stack: 0,
pointPlacement: 0.4,
data: [133, 156, 947, 408, 206]
}]
});
});