getFreeSlack
info
This functionality is available in the PRO edition only.
Description
Returns the free slack of a task
getFreeSlack: (task: Task) => number
Parameters
task- (required) Task - the object of a task
Returns
free_slack- (number) - the free slack of a task
Example
const task = gantt.getTask(7);
gantt.getFreeSlack(task);
Related samples
Details
note
This method is defined in the critical_path extension, so you need to activate the critical_path plugin using the gantt.plugins method. Read the details in the Critical Path article.
Free slack is a period of time that can be used to increase the duration of a task or move it on the timeline without affecting the next task it is connected with.