opqpop
Posts: 1
Joined: Sun Mar 31, 2024 8:06 am

Range selector - possible for 2 sets of buttons? Zoom and Granularity?

Hi, would like to let user filter by both Zoom and by Granularity.

This ex shows how granularity would work: https://jsfiddle.net/gh/get/library/pur ... agrouping/

Instead of input on the right hand side, I'd like to show standard Zoom buttons that control the time period displayed (while left hand side will control the data granularity, daily, weekly, monthly, etc.)

What's the easiest way to do this?
jakub.s
Posts: 1218
Joined: Fri Dec 16, 2022 11:45 am

Re: Range selector - possible for 2 sets of buttons? Zoom and Granularity?

Hi,

Welcome to our forum & thanks for the question!

There is no option like that built-in in Highcharts which would allow you to position the buttons according to your custom alignement.

This is, however, definitely possible to achieve.

You could add your own custom buttons (either HTML or with the Highcharts.SVGRenderer) and then use the chart.update method to just update the dataGrouping or the axis.extremes.

API:
- https://api.highcharts.com/class-refere ... art#update
- https://api.highcharts.com/class-refere ... etExtremes
- https://api.highcharts.com/highstock/se ... taGrouping

Do not hesitate to ask in case you have any more questions about this.

Best regards!
Jakub
Highcharts Developer

Return to “Highcharts Stock”