johnspiro
Posts: 2
Joined: Mon Oct 17, 2022 5:43 am

How to trigger Range selector externally?

Hi, Greetings!

So far I found Highcharts are pretty enjoyable to work with compared to charts.js.

However, I have a problem. Is there anywhere to trigger the Range selector externally via Javascript with React? I would like to have my custom buttons that can be triggered by onClick.

Thank you all, I appreciate your help!
eg.png
eg.png (21.08 KiB) Viewed 655 times
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: How to trigger Range selector externally?

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

Of course, you can set the desired extremes by using some external buttons. All you need to use is axis.setExtremes method. Please, check the demo below to see an example.

Demo: https://jsfiddle.net/BlackLabel/5hcjtb41/
API Reference: https://api.highcharts.com/class-refere ... etExtremes

Feel free to ask any further questions.
Regards!
Hubert Kozik
Highcharts Developer
johnspiro
Posts: 2
Joined: Mon Oct 17, 2022 5:43 am

Re: How to trigger Range selector externally?

Thanks for your guidance. I'll give it a try!
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: How to trigger Range selector externally?

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

Return to “Highcharts Stock”