Is it possible to plot a line on click event of the chart?
chart: {
events: {
click: function(event) {
alert ('x: '+ event.xAxis[0].value +', y: '+
event.chartY );
var chart = event.xAxis[0];
chart.removePlotLine('plot-line-1');
chart.addPlotLine({
value: event.chartX,
color: '#FF0000',
width: 2,
id: 'plot-line-1'
});
}
}
},
I had initially done the same on the plotoptions click event of highcharts. Now, doing the same using chart click event? but not able to get the series xaxis object.