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: {
load: function() {
let data = this.series[0].data
data.forEach(el=>{
if (el.category % 5 === 0) {
this.xAxis[0].addPlotLine({
value: el.category,
color: 'red',
});
}
})
},
},
},
series: [{
data: [2, 5, 1, 6, 7, 8, 5, 5, 35, 34, 34, 63, 46, 34, 4, 53, 34]
}],
});