Our state of the art Gantt chart


Post by vladip »

Hi there,

I encountered the issue when the Gantt got stuck after getting this error:

CleanShot 2025-06-18 at 11.32.23.png
CleanShot 2025-06-18 at 11.32.23.png (30.07 KiB) Viewed 287 times

It can be easily reproduced in your demo LWC component:

  • set manuallyScheduled: true for the first three tasks and add an invalid dependency from the first task to the third one (from parent to child)

  • add to any of the toolbar buttons such code

    gantt.project.taskStore.forEach(t => console.log(t.name, t.totalSlack), this, { includeFilteredOutRecords: true, includeCollapsedGroupRecords: true });
CleanShot 2025-06-18 at 11.05.30@2x.png
CleanShot 2025-06-18 at 11.05.30@2x.png (107.3 KiB) Viewed 287 times

So when the Gantt is loaded and you click the button, you will get the error on the first task trying to get its total slack (probably some other fields too, but not the name, for example). After this error, the tab gets stuck and can't be reloaded.


Post by alex.l »

Hi,

add an invalid dependency from the first task to the third one (from parent to child)

How did you do that? It's not allowed to do for me, the spot is highlighted as invalid, since we are not allow to use dependencies from parent to child. What version of Gantt are you on?

All the best,
Alex Lazarev

How to ask for help? Please read our Support Policy

We do not write the code in bounds of forum support. If you need help with development, contact us via bryntum.com/services


Post by vladip »

Hi alex.l,
You need to set manuallyScheduled and add an invalid dependency manually in the source data, not via UI. This is v.6.2.1. And one more detail, the error goes from onComputationCycleHandlerSync function.


Post by alex.l »

Such dependencies are forbidden because it causes cycles. The steps you did caused a cycle, the error is about that appeared in a console.
To be allowed to create forbidden dependencies which causes logic cycles, try to mark them active: false.

All the best,
Alex Lazarev

How to ask for help? Please read our Support Policy

We do not write the code in bounds of forum support. If you need help with development, contact us via bryntum.com/services


Post by vladip »

I understand that it's forbidden in UI. But the case from the real world: the data already has such broken dependencies. Shouldn't it be validated while loading (even with manuallyScheduled flag)? Or probably is there an option to call validation for manuallyScheduled tasks as well?


Post by alex.l »

Hi,

Nothing built-in, but you might try to validate before load, or on BE, you won't need an Engine for that.

Something like.

for (const dependency of dependencyStore.allRecords) {
    const predecessor = taskStore.getById(dependency.fromEvent);
    const successor = taskStore.getById(dependency.toEvent);

if (successor?.contains(predecessor) || predecessor?.contains(successor)) {
    dependency.active = false;
}
}

All the best,
Alex Lazarev

How to ask for help? Please read our Support Policy

We do not write the code in bounds of forum support. If you need help with development, contact us via bryntum.com/services


Post Reply