[Angular] Gantt Chart Vertical Scroll is not working


#1

Hi Team,

We were integrating Gantt Chart in an Angular Component. It’s working correctly, but we are facing issue with vertical scroll.
In Mocks & Gantt Chart Samples we see that Gantt Chart Header (i.e. scales) are fixed and only content is scrollable.
But same thing is not happening in our case. Should I set any specific parameter for this.
Our Structure :

  • We have an Angular Component. inside this we have created a div.gantt_chart and in this div we are loading gantt chart. For this div I have given height as 400px; But it’s calculating based on the data present and re-setting height to 1087px.

AFAIK, scroll works based on the OVERFLOW property of CSS. I tried to find that property in the DOM but I wasn’t able to find.
Can you please help me in debugging this issue?

Please let me know if you want more information.

Thank you,
Bhavesh Kumar.


#2

Hello Bhavesh,
According to your description, you may be using the autosize option:
https://docs.dhtmlx.com/gantt/api__gantt_autosize_config.html
When it is enabled, Gantt stretches its container to fit the sizes of all task rows and it renders the HTML elements of all tasks. This can affect performance.

With that configuration, Gantt cannot scroll itself as its parent element should be scrolled.

If that doesn’t help you, please send me a ready demo so that I can reproduce the issue locally.


#3

Thank you Ramil.
It worked. It was because of autosize option only.