Critical path - Ignoring an object

I would appreciate help in finding a solution: I have Gantt on the Salesforce system. In the system I can create an object of type PROGRAM and insert tasks into it, because the program also enters Gantt with a start and end date, it will always be the critical path, how can I display it in Gantt but ignore it when selecting the critical path and mark only the tasks of that program.

Hello,
There is no way to customize how the critical path logic works.
But it is possible to exclude some tasks from the critical path chain.

One of the ways is to unschedule the task:
https://docs.dhtmlx.com/gantt/desktop__unscheduled_tasks.html

You can check how it works in the following snippet:
https://snippet.dhtmlx.com/y66q4lzc

But that task should not be linked to other tasks, otherwise, it will be included in the critical path chain. The dev team will fix that bug in the future, but I cannot give you any ETA.

Another way is to use the auto_scheduling_use_progress config:
https://docs.dhtmlx.com/gantt/api__gantt_auto_scheduling_use_progress_config.html

When that config is enabled, the task with the 100% progress is removed from auto-scheduling and critical path calculation even if it is connected to the critical tasks. But this config is applied to all tasks regardless of their type.
You can check how it works in the following snippet: