gantt.templates.task_class = function (start, end, task) {
if (task.type == gantt.config.types.meeting) {
return "meeting_task";
}
return "";
};
then you put the type in the task {id: 14, text: "Task #3", start_date: "02-04-2023", type: gantt.config.types.meeting, duration: "6", parent: "11", progress: 0.8, open: true},
This works great for tasks, but what if you want a custom milestone type ?
for example milestone1 would be blue, milestone2 would be yellow
if I do {id: 14, text: "Task #3", start_date: "02-04-2023", type: gantt.config.types.milestone1, duration: "6", parent: "11", progress: 0.8, open: true},
I will have a blue task shape, not a blue milestone shape
Is there a way to tell in the config the type milestone1 should be displayed as a milestone and not a task ?
Hello,
Milestone is a task type. So, if you want to create a custom type for the milestones, it is not different from creating a custom type for tasks. You can add any level of customization for the custom types, but you need to implement it manually, including the styles and the logic.
You need to add these style rules to see the diamond shape: