simple
by Black Label
HTML
<script src="https://code.highcharts.com/gantt/highcharts.js"></script>
<script src="https://code.highcharts.com/gantt/modules/gantt.js"></script>
<div id="container"></div>
CSS
@import 'https://code.highcharts.com/css/highcharts.css
#container {
max-width: 800px;
margin: 1em auto;
height: 500px;
}
.rect-shadow {
filter: url(#glow) !important;
}
JavaScript
Highcharts.ganttChart('container', {
title: {
text: 'Gantt Chart with Progress Indicators'
},
chart: {
events: {
load() {
let chart = this;
chart.series[1].points[2].graphic.translate(0, -10);
chart.series[1].points[2].dataLabel.text.translate(0, -30);
}
}
},
plotOptions: {
series: {
dataLabels: {
enabled: true,
verticalAlign: "top",
format: "{point.custom.label}"
}
}
},
yAxis: {
uniqueNames: true,
categories: ['Magdala', 'Test prototype', 'Develop'],
},
series: [{
type: 'line',
zoneAxis: 'x',
zones: [{
value: Date.UTC(2014, 10, 20)
}, {
dashStyle: 'dot',
value: Date.UTC(2014, 10, 25)
}],
data: [{
name: 'Magdala',
y: 0,
x: Date.UTC(2014, 10, 18),
custom: {
label: 1
}
}, {
name: 'Magdala',
y: 0,
x: Date.UTC(2014, 10, 25, 12),
custom: {
label: 2
}
}]
}, {
type: 'line',
zoneAxis: 'x',
zones: [{
value: Date.UTC(2014, 10, 28)
}, {
dashStyle: 'dot',
value: Date.UTC(2014, 10, 29)
}],
data: [{
name: 'Magdala',
x: Date.UTC(2014, 10, 25, 16),
y: 0,
custom: {
label: 3
}
}, {
name: 'Magdala',
x: Date.UTC(2014, 10, 29),
y: 0,
custom: {
label: 4
},
},
{
name: 'MILESTONE',
x: Date.UTC(2014, 10, 28),
y: 0,
milestone: true,
pointWidth: 100,
color: '#fa0',
custom: {
label: 'MILESTONE'
}
}
]
}]
});