abhimanusharma
Posts: 1
Joined: Wed Dec 29, 2021 11:06 am

Get yAxis value of a series by xAxis value

In a series xAxis represents time and yAxis represent the value(any numeric value).

How can I get value at yAxis at a certain timestamp.

const axis = chart.xAxis[0];
const series = chart.series[0];

yData = series.getYaxisData(xAxisValue);
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Get yAxis value of a series by xAxis value

Hello,

Welcome to our forum and thanks for contacting us with your question!

If you understand correctly that you want to extract the value of a given point by date, you can achieve it in the same way as in the attached demo.

Demo: https://jsfiddle.net/BlackLabel/dxmbn9c4/

Let me know if that was what you were looking for!
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/

Return to “Highcharts Stock”