JSFiddle - React, Tailwind, and code Playground
by Balázs Baumgartner
HTML
<script src="https://github.highcharts.com/gantt/highcharts-gantt.src.js"></script>
<div id="container"></div>
JavaScript
var today = new Date(),
day = 1000 * 60 * 60 * 24;
// Set to 00:00:00:000 today
today.setUTCHours(0);
today.setUTCMinutes(0);
today.setUTCSeconds(0);
today.setUTCMilliseconds(0);
today = today.getTime();
// THE CHART
Highcharts.ganttChart('container', {
title: {
text: 'Gantt Chart Test'
},
xAxis: {
currentDateIndicator: true,
tickInterval: 5000
},
plotOptions: {
gantt: {
pathfinder: {
type: 'simpleConnect'
}
}
},
series: [{
name: 'Offices',
data: [{
taskName: 'New offices',
id: 'new_offices',
start: today,
end: today + 1 * day
}]
}]
});