luka9898
Posts: 6
Joined: Wed Jul 04, 2018 9:08 am

Zooming - from month, day to hours

Hello,

I've been playing with HighCharts Gantt chart and I found this demo https://jsfiddle.net/gh/get/library/pur ... navigation
Minimum interval into which you can zoom there is 5 days.

I also found second demo, where there is no such limitation and you can zoom to hour level
https://stackblitz.com/edit/highcharts- ... mponent.ts

Is there a possibility in the first demo, that it would be also possible to zoom to the hour level just like in second demo? Is minimum zooming interval somehow automatically calculated depending on the data?

I also tried to load range of 10 days (in the first demo), and 5 day limitation also applied there.

My use case is that I have data for 1 month, but I would like to zoom it in to the hour level.

Best regards,
Luka
User avatar
dawid.d
Posts: 807
Joined: Thu Oct 06, 2022 11:31 am

Re: Zooming - from month, day to hours

Hello,

Thanks for contacting us with your question!

Yes, by default, the minimum zooming interval is automatically calculated depending on the data.

There are basically two attributes for the xAxis you need.
  1. minRange - is responsible for the minimum zoom value: https://api.highcharts.com/gantt/xAxis.minRange
  2. minTickInterval - is responsible for the minimum value range displayed above the chart: https://api.highcharts.com/gantt/xAxis.minTickInterval
Demo: https://jsfiddle.net/BlackLabel/1ed7wvxo/

Let me know if that was what you were looking for!
Best regards
Dawid Draguła
Highcharts Developer
luka9898
Posts: 6
Joined: Wed Jul 04, 2018 9:08 am

Re: Zooming - from month, day to hours

Yes, that is exactly what I was looking for. Thanks a lot!

Best regards,
Luka
User avatar
dawid.d
Posts: 807
Joined: Thu Oct 06, 2022 11:31 am

Re: Zooming - from month, day to hours

You're welcome! In case of any further questions, feel free to contact us again!
Regards
Dawid Draguła
Highcharts Developer

Return to “Highcharts Gantt”