Is there a way to tell when the Gantt chart is fully loaded and I would be able to get the this.gantt.project.inlineData data ?
Support Forum
Yes you can listen to the https://bryntum.com/docs/gantt/api/Gantt/model/ProjectModel#event-load event to be notified when load is complete.
This does not seem to work with the inline data. Using the inline data is there a way to simply know when the data has finished calculating and this.gantt.project.inlineData has the finished values?
For example, I tried using the loadlineData method, in the documentation, it's an async method but when I look at the interface the method is void.
https://bryntum.com/docs/gantt/api/Gantt/model/ProjectModel#function-loadInlineData
- Attachments
-
- loadData.PNG (11.96 KiB) Viewed 336 times
Then, you can listen to the https://bryntum.com/docs/gantt/api/Gantt/model/ProjectModel#event-dataReady event.
Here is an example code:
gantt.project.on('dataReady', () => {
console.log('ready');
})
Hi!
We have issue to fix async typings.
https://github.com/bryntum/support/issues/4808
Before it is fixed for typescript app please add // @ts-ignore
to bypass the error:
// @ts-ignore
await project.loadInlineData({
eventsData : [...],
resourcesData : [...],
assignmentsData : [...],
dependenciesData : [...]
});