task overlap problem

关于我在使用DHX时,当两个task存在重合时,让重合部分改变颜色,但是我没有实现成功,并且在官方文档上没有看见相当于的方法?

Hello,
Please ask the questions on the forum only in English so that everyone can understand them.

When I use DHX, when two tasks overlap, let the overlapping part change the color, but I have not succeeded in implementing it, and I have not seen the equivalent method in the official documents?

Right now, Gantt doesn’t do anything when the split tasks overlap. In the future, the dev team will add a way to put these tasks one below another, but I cannot give you any ETA.

If you want to highlight the overlaps of the child tasks, you need to implement a custom solution. You can use the addTaskLayer method that allows showing any HTML elements in the timeline:
https://docs.dhtmlx.com/gantt/api__gantt_addtasklayer.html

Then you need to calculate if a task overlaps with the dates of other sibling tasks.

I have the following example of the implementation where the overlaps are highlighted on a project task:

If you want to change the task color when it overlaps with another tasks, you need to use a different approach, but you still need to calculate the dates:
https://snippet.dhtmlx.com/5/4f53b734b

1 Like

Okay, thank you very much for your reply. I will refer to the demo you provided here. Thank you very much for your reply. Thank you

1 Like