Our state of the art Gantt chart


Post by mv2022 »

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 ?


Post by mats »

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.


Post by mv2022 »

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
loadData.PNG (11.96 KiB) Viewed 335 times

Post by tasnim »

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');
})

Post by sergey.maltsev »

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 : [...]
});

Post Reply