а

Custom Milestone Gantt


#1

Hi All,
I want create multiple milestone on a single line same task (see more in attacked file).

I found another topic in 4r but not enough



Thanks


#2

Hello Duong,
You can use the split task functionality to display several tasks on the same line:
https://docs.dhtmlx.com/gantt/desktop__split_tasks.html
You can to drag those tasks or delete them.
Here is an example of how it might work:
http://snippet.dhtmlx.com/00e5d4c11

Another way is to use the additional layer feature:
https://docs.dhtmlx.com/gantt/api__gantt_addtasklayer.html
Although it allows displaying everything you want over tasks, you need to spend time on implementing the solution that fits your requirements.
Here is an example of how it might be implemented:
http://snippet.dhtmlx.com/d6c9b85f2


#3

Thanks u so much. I can adding milestone same line at the moment, but I have small issue that’s can’t drag task with milestone icon


#4

Hello Duong,
If you use the first snippet, everything should work correctly there.

If you use the second snippet - you need to implement a custom solution because those custom milestones are not actually tasks, they are just HTML elements.
For example, you need to define the custom milestone dates, otherwise, they will be moved to the predefined position after you drag the task:
http://snippet.dhtmlx.com/ce78fcd09
Here is an example of how you can drag custom milestone elements and save their date in the task object:
http://snippet.dhtmlx.com/536832002
It might help you to create your solution.


#5

Yay! Thanks for your fast responding
But my meaning that’s drag the task instead milestone icon :slight_smile:

Thanks u somuch <3


#6

Hello Duong,
Thank you for the clarification.
In that case, you just need to add the following style rule, then you will be able to drag the parent task:

.gantt_split_parent{
  pointer-events: initial;
}

Here is the snippet:
http://snippet.dhtmlx.com/01e43dd60