Basic line
by Black Label
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<div id="container" style="height:300px"></div>
JavaScript
Highcharts.chart('container', {
chart: {
events: {
click: function(event) {
var label = this.renderer.label(
'x: ' + Highcharts.numberFormat(event.xAxis[0].value, 2) + ', y: ' + Highcharts.numberFormat(event.yAxis[0].value, 2),
event.xAxis[0].axis.toPixels(event.xAxis[0].value),
event.yAxis[0].axis.toPixels(event.yAxis[0].value)
)
.attr({
fill: Highcharts.getOptions().colors[0],
padding: 10,
r: 5,
zIndex: 8
})
.css({
color: '#FFFFFF'
})
.add();
setTimeout(function() {
label.fadeOut();
}, 1000);
}
},
},
series: [{
data: [2, 5, 1, 6, 7, 8, 5, 5, 35, 34, 34, 63, 46, 34, 4, 53, 34]
}],
});