dhiresh13
Posts: 12
Joined: Tue Aug 30, 2022 4:31 am

Event to find point values of x-axis based on limit set on y-axis

Hello,
I am trying to figure out a way where i can get the x-axis values(timestamps) based on the limit set on the y-axis,

In the image below,I want to fetch all the values on x-axis as well as values of y-axis below the first plotline(the points highlighted in green) and beyond the second plotline(the points highlighted in pink) on a click/load event.
Screenshot from 2023-03-22 13-19-30.png
Screenshot from 2023-03-22 13-19-30.png (5.51 KiB) Viewed 255 times
for e.g : i need the values which are below the 9 value on y-axis and above 14 value on y-axis.
jakub.j
Posts: 1091
Joined: Tue Jan 24, 2023 11:14 am

Re: Event to find point values of x-axis based on limit set on y-axis

We appreciate you reaching out to us!

I prepared a demo where I find the points below and over the plotLines and update them with green and pink colors as you showed on the screenshot.
Demo: https://jsfiddle.net/BlackLabel/4fjo9Lxc/

The second one is simply filtering the points and adding them to proper array.
Demo: https://jsfiddle.net/BlackLabel/cze4fav0/

Both the solutions will work no matter what 2 values of the plotLines you set.

Feel free to ask any further questions!
Best regards
Jakub
dhiresh13
Posts: 12
Joined: Tue Aug 30, 2022 4:31 am

Re: Event to find point values of x-axis based on limit set on y-axis

Thanks alot. It helped me clear a big hurdle. :)
jakub.j
Posts: 1091
Joined: Tue Jan 24, 2023 11:14 am

Re: Event to find point values of x-axis based on limit set on y-axis

You're welcome!
In case of any further questions, feel free to contact us again.

Best regards
Jakub

Return to “Highcharts Usage”