Can I make the horizontal scrollbar always display



Hi @kevinyaoooooo!

At the moment, the Gantt has no such functionality.
As a workaround, you can overwrite the internal _resizeScrollbars method in order to prevent hiding not active scrollbars.

Assign it an empty function during the onGanttLayoutReady event.

After that, the scrollbars will always display.
Here is a sample, where you can see how to do it:

I can not guarantee that this method will work after updates of the gantt in the future.


This solution doesn’t seem to work for me anymore as of version 7.1.6. I had luck overriding resizeScrollbars with this custom function though.

gantt.$ui.getView(“main”).constructor.prototype._resizeScrollbars = function (autosize, scrollbars) { scrollbars.forEach((scrollBar) => scrollBar.$};


Hello Daniel,
With a simple configuration, both solutions work correctly:

However, you can use a custom layout configuration. It is possible to add the group property to the scrollbar layout cell. Then, you can link several scrollbars. If at least one scrollbar needs to be displayed, Gantt will show all of them:
It means that you can create an empty timeline view with the grouped scrollbar. After adding the width: 1 parameter, the timeline will always be scrolled. That means that Gantt will always display the scrollbar for the main timeline: