I have a stock chart and I would like to get the value shown in the yAxis label that the crosshairs create when clicking in a plot. Essentially I want to know what the price is on the yAxis for the current location of my mouse when I click. So lets say the crosshairs yAxis label is showing 20, when I click, I want to put that 20 into a variable. So how can I "get" the crosshair's yAxis value? Thanks
const yAxis = plot.yAxis();
plot.listen('click', function (e) {
console.log(e)
//this will get the first label on the y Axis, this is 12
//I dont want the yAxis of the chart labels, I want the crosshair yAxis label
const value = yAxis.scale().ticks().get()[0];
console.log(value)
//prints 12
var value = chart.crosshair().yLabel()
//I dont know what to query to get the "value" of the label
console.log(value)
});