JSFiddle - React, Tailwind, and code Playground
HTML
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function () {
$('#container').highcharts({
chart: {
type: 'bar'
},
title: {
text: 'PPAP Status'
},
xAxis: {
categories: ['Part1', 'Part2', 'Part3', 'Part4', 'Part5']
},
yAxis: {
allowDecimals: false,
min: 0,
type: 'hours',
title: {
text: 'Time'
},
stackLabels: {
enabled: true,
style: {
fontWeight: 'bold',
color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
}
}
},
tooltip: {
formatter: function() {
return '<b>'+ this.x +'</b><br/>'+
this.series.name +': '+ Date(this.y) +'<br/>'+
'Total: '+ this.point.stackTotal;
}
},
plotOptions: {
bar: {
stacking: 'normal',
dataLabels: {
enabled: true,
color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'black'
}
},
},
series: [{
name: 'Requested',
data: [1384972200000,1385231400000, 1385058600000, 1384972200000, 1385317800000],
stack: 'Planned'
}, {
name: 'Requested',
data: [1384972200000, 1385058600000, 1385231400000, 1384972200000, 1385317800000],
stack: 'Actual'
}, {
name: 'Submitted',
data: [1385058600000, 1384972200000, 1385058600000, 1385317800000, 1385317800000],
stack: 'Planned'
}, {
...