Highcharts.chart('container', {
chart: {
type: 'xrange',
height: 300,
events: {
render: function() {
var chart = this,
point = chart.series[0].points[0],
imgSize = 22,
x = point.plotX + chart.plotLeft + point.shapeArgs.width / 2 - imgSize / 2,
y = point.plotY + chart.plotTop - point.shapeArgs.height - imgSize / 2,
offsetTop = -5,
svgElem;
if (chart.customElemenst && chart.customElemenst.length) {
chart.customElemenst.forEach(function(elem) {
elem.destroy();
});
}
chart.customElemenst = [];
svgElem = chart.renderer.image(
'https://upload.wikimedia.org/wikipedia/commons/thumb/2/25/Info_icon-72a7cf.svg/256px-Info_icon-72a7cf.svg.png',
x,
y + offsetTop,
imgSize,
imgSize
).add();
chart.customElemenst.push(svgElem);
}
}
},
title: {
text: 'Highcharts X-range'
},
xAxis: {
type: 'datetime'
},
yAxis: {
title: {
text: ''
},
categories: ['Prototyping', 'Development', 'Testing'],
reversed: true
},
plotOptions: {
series: {
borderRadius: 0
}
},
series: [{
name: 'Project 1',
borderColor: 'gray',
pointWidth: 20,
data: [{
x: Date.UTC(2014, 10, 21),
x2: Date.UTC(2014, 11, 2),
y: 0,
partialFill: 0.25
}, {
x: Date.UTC(2014, 11, 2),
x2: Date.UTC(2014, 11, 5),
y: 1,
color: 'green'
}, {
x: Date.UTC(2014, 11, 9),
x2: Date.UTC(2014, 11, 19),
y: 1,
color: 'green'
}, {
x: Date.UTC(2014, 10, 21),
x2: Date.UTC(2014, 11, 2),
y: 1,
color: 'red'
}, {
x: Date.UTC(2014, 11, 5),
x2: Date.UTC(2014, 11, 9),
y: 1,
color: 'red'
}],
dataLabels: {
enabled: true
}
}]
});
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/xrange.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container"></div>