Dhtmlx gantt chart 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 would be the gantt).

The code is simply the html home.component 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.

Option A: Disable the lazy loading that Ionic opts you into by deleting every .module.ts file except for the app.module.ts. Don’t use Ionic’s generators for components.

Option B: Put all the junk needed for your external charting library in the component module for every component that needs it. Simply doing it in the app module (as your linked tutorial suggests) will not be sufficient if you go this route.

Hi, thanks for your answer. Unfoertunately your solution doesn’t work, I don’t think the problem is in the modules because when I don’t wrap the gantt chart with the ion-component it works; probably is a sort of race condition beacuse the gantt is inizialized inside the ngAfterViewInit() (not in the ngInit as in the example, I forgot to say this into the question).

Did you find a way to get this working?

Yes, you can find the solution in the first answer of this topic angular - Dhtmlx gantt can't be shown inside an ion-content - Stack Overflow