If I look at gantt.getLinks() before and after the update, I see that the link value updates correctly (the lag value changes). However, the task does not get re-scheduled on the gantt.
I added the onAfterAutoSchedule event and added a console.log(taskId) to make sure it was working. It printed {taskID: 2}, so I know that auto schedule is running but not doing anything.
Do you have any suggestions of how to further debug this and get tasks to update when their links’ lag changes?
Hello Weis,
The lag parameter is used to specify the number of duration units(days or hours) between tasks. If you use the autoscheduling functionality, Gantt will keep that duration between tasks when you move the predecessor task.
If you use the critical path functionality, the lag parameter is considered when Gantt decides if the task should be critical or not.
If you don’t use those features, the lag parameter doesn’t affect anything else. And it doesn’t really reflect the actual duration between tasks.
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan