본문으로 건너뛰기

isCriticalTask

정보

이 기능은 PRO 에디션에서만 사용할 수 있습니다.

Description

지정된 작업이 중요한지 여부를 확인합니다

isCriticalTask: (task: Task) => boolean

Parameters

  • task - (required) Task - 해당 작업의 객체

Returns

  • value - (boolean) - 'true' 이면 해당 작업이 중요한 것이고, 그렇지 않으면 'false'입니다

Example

const tasks = {
data:[
{id:1, text:"Project #1", start_date:"01-04-2023", duration:18, type:"project"},
{id:2, text:"Task #1", start_date:"02-04-2023", duration:8, parent:1},
{id:3, text:"Task #2", start_date:"13-04-2023", duration:8, parent:1}
],
links:[
{id:1, source:1, target:2, type:"1"},
{id:2, source:2, target:3, type:"0"}
]
};

gantt.config.highlight_critical_path = true; /*!*/
gantt.init("gantt_here");
gantt.parse(tasks);

gantt.isCriticalTask(gantt.getTask(2));// ->'false' /*!*/
gantt.isCriticalTask(gantt.getTask(3));// ->'true' /*!*/

Details

노트

이 메서드는 critical_path 확장으로 정의되어 있으므로 critical_path 플러그인을 활성화해야 합니다. 자세한 내용은 Critical Path 문서를 참조하십시오.

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.