getTaskByIndex

根据全局任务索引返回对应的任务

Task getTaskByIndex(number | string index);
indexnumber | string任务在整体任务列表中的位置(从零开始)
Task对应指定索引的任务对象

Example

const globalTaskIndex = gantt.getGlobalTaskIndex(19); // -> 10
 
const task = gantt.getTaskByIndex(10); 
// -> {id:"19", text:"Task name", type:"project", order:"10", progress:0.4, …}

See also
Back to top