pc1990
Posts: 2
Joined: Tue Jan 03, 2023 8:31 am

how to change datasource when click rangeselector in highcharts?

how to change datasource when click rangeselector in highcharts? for example click day change data for day and other ( week,month,year )load another data
Jensen
Posts: 1
Joined: Mon Jan 09, 2023 5:48 pm
Contact: Website

Re: how to change datasource when click rangeselector in highcharts?

Hello to all,

I'd love to get some feedback on this too, it would help me a lot.
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: how to change datasource when click rangeselector in highcharts?

Hello,

You can use the xAxis.events.setExtremes() callback function to check if it was called by clicking any of the buttons and then use the chart.update() method to update the data.

Demo: https://jsfiddle.net/BlackLabel/297rhqkf/
API: https://api.highcharts.com/highcharts/x ... etExtremes

Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/

Return to “Highcharts Stock”