leite.g
Posts: 8
Joined: Wed Jun 21, 2023 8:47 am

Gantt Chart horizontal scrolling mouse wheel

Hey there!

I was looking for a chart property that would activate horizontal scrolling with mouse wheel.
I went through this topic (viewtopic.php?t=40633) but because it's quite old, I wonder if this functionality could have been undegraded recently.

The idea is moving the chart left to right and right to left as if one was clicking and dragging the navigator bar, however using the mouse wheel.

Thank you! :)

PS: I don't have any sample on this, but I hope the explanation was good enough :D
User avatar
dawid.d
Posts: 755
Joined: Thu Oct 06, 2022 11:31 am

Re: Gantt Chart horizontal scrolling mouse wheel

Hi,

Thanks for contacting us with your question!

Basically, the demo you posted doesn't seem to be outdated. I only adapted it to Gantt and instead of scrolling from the scrollbar, I changed the scrolling to work while hovering over the entire container.

Demo: https://jsfiddle.net/BlackLabel/ousxyq1p/

I hope it was useful
Best regards
Dawid Draguła
Highcharts Developer
leite.g
Posts: 8
Joined: Wed Jun 21, 2023 8:47 am

Re: Gantt Chart horizontal scrolling mouse wheel

Hi,

It seems to work. However, if you add enough tasks to need to scroll vertically, the chart gets funky.
I was looking for a horizontal gesture response and/or horizontal wheel response so the vertical scroll wound not be affected.

Thanks! :)

BR
User avatar
dawid.d
Posts: 755
Joined: Thu Oct 06, 2022 11:31 am

Re: Gantt Chart horizontal scrolling mouse wheel

Hi,

If you don't want the events to mix, you can set e.g. horizontal scrolling only when shift is pressed.

Demo: https://jsfiddle.net/BlackLabel/zc7L5xvk/

Let me know if that was what you were looking for
Dawid Draguła
Highcharts Developer
leite.g
Posts: 8
Joined: Wed Jun 21, 2023 8:47 am

Re: Gantt Chart horizontal scrolling mouse wheel

Hi!

Yes. It was accepted as a solution! :)

Thanks
leite.g
Posts: 8
Joined: Wed Jun 21, 2023 8:47 am

Re: Gantt Chart horizontal scrolling mouse wheel

Hi there,

I've got some feedback from MacOS users with multiple browsers reporting scrolling mal function.

When debugging I couldn't find anything obvious besides the fact the chartPosition variable would take too long to get updated or, sometimes, wouldn't update its value whatsoever.

I tried to change the deltaY compensation to 10000 and 100 to understand its importance on the issue but it didn't point anywhere.

When testing the sample in jsfiddle, we tried using both the trackpad and and external mouse and the issue is there in both cases.

Do you have any similar feedback on this?

Thanks a lot!
User avatar
dawid.d
Posts: 755
Joined: Thu Oct 06, 2022 11:31 am

Re: Gantt Chart horizontal scrolling mouse wheel

Hi,

Interesting. I'll investigate it and let you know as soon as I have any information.

Best regards!
Dawid Draguła
Highcharts Developer
piotr.m
Posts: 1433
Joined: Mon Nov 18, 2019 8:15 am

Re: Gantt Chart horizontal scrolling mouse wheel

Hi,

I attempted to replicate the issue on a Mac device without success.
Could you offer more specific steps detailing when this issue arises?
Also, did this problem surface using the exact demo we previously shared?
https://jsfiddle.net/BlackLabel/zc7L5xvk/

Kind Regards
Piotr Madej
Highcharts Developer

Return to “Highcharts Gantt”