Dhtmlx gantt can't be shown inside an ion-content

I am developing a ionic-angular application in which I need some gantt charts, I tried to use the Dhtmlx library but when I insert the gantt chart inside an ion-content the gantt disappear (but with inspect I can see the empty space where wold be the gantt).

The code is simply an html with <ion-content> <gantt></gantt> </ion-content> where the gantt is exactly the code in this tutorial [dhtmlx.com/blog/dhtmlx-gantt-chart-usage-angularjs-2-framework]

Anyone has an idea on how I can resolve this issue? Thanks in advance.

Hello Daniele,
It seems that when Gantt is initialized, the container has 0 pixels for the width and height, so, Gantt is shrunk. As a workaround, you can initialize Gantt after a timeout.
Here is the demo:
https://files.dhtmlx.com/30d/9d735c16565563829fab087d96937cf7/ionicframework+gantt.zip

1 Like

It works, thank you so much for your help!