Show/Hide scrollbars on the gant on mouse hover

Dear Support,

I want to ask if it’s possible to show scrollbar of the gantt only on mouse hover, It should be hidden by default.

Thanks in advanced.


Hi @koda5,
In order to do this, you have two ways. You can change gantt.config.scroll_size, like in the snippet below:
This way has one issue- to apply config updates on the screen you should call gantt.init() the method and it will reset the scroll position of your gantt chart to start.
The second way is to change css styles of scroll bars directly, and doesn’t reload the whole gantt chart, like in the snippet below:
I think that the second way works better, but you can choose which method better meets your requirements.

Hi Siarhei,

Thank you, it works in both ways and definitely I will choose second option.


1 Like