JSFiddle - React, Tailwind, and code Playground
HTML
<div id="container" style="height: 400px"></div>
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/highcharts-more.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
JavaScript
$(function () {
$('#container').highcharts({
chart: {
type: 'columnrange',
inverted: true
},
title: {
text: 'Equipment Status'
},
xAxis: {
categories: ['A', 'B', 'C']
},
yAxis: {
type: 'datetime',
title: {
text: 'Status'
}
},
plotOptions: {
columnrange: {
grouping: false
}
},
legend: {
enabled: true
},
tooltip:{
formatter: function() {
return '<b>'+ this.x +' - ' +this.series.name +'</b><br/>'+
Highcharts.dateFormat('%e %B %H:%M',this.point.low)+
' - ' +Highcharts.dateFormat('%B %e %H:%M',this.point.high)+'<br/>';
}
},
series: [{
name: 'Up',
data:[
{
x: 0,
low: Date.UTC(2013, 07, 03, 0, 0, 0),
high: Date.UTC(2013, 07, 03, 4, 0, 0)
},
{
x: 0,
low: Date.UTC(2013, 07, 03, 10, 0, 0),
high: Date.UTC(2013, 07, 03, 18, 0, 0)
},
{
x: 1,
low: Date.UTC(2013, 07, 03, 2, 0, 0),
high: Date.UTC(2013, 07, 03, 9, 0, 0)
},
{
x: 1,
low: Date.UTC(2013, 07, 03, 18, 0, 0),
high: Date.UTC(2013, 07, 03, 24, 0, 0)
}
]
},
{
name: 'Down',
data:[
{
x: 0,
low: Date.UTC(2013, 07, 03, 4, 0, 0),
high: Date.UTC(2013, 07, 03, 10, 0, 0)
},
...