getTaskWork
Description
Returns a task's work in the configured effort work unit
getTaskWork: (taskId: string | number) => number;
Parameters
taskIdis the ID of an existing task.
Returns
The amount of work in the configured work unit. When effort calculations are enabled, a summary task returns the total work of its children. For other tasks, the method returns stored work if available. When there is no stored value, Gantt derives work from the task dates and allocations if effort calculations are enabled, or returns 0 if they are disabled.
Example
const work = gantt.getTaskWork(1);
Related API
Related guides
Change log
- Added in v10.1.
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.