Aditional icon on task

Hello all,

Is there any way to add a new icon on some tasks in certain conditions?

I was looking for this on documentation but I cannot found.

Thanks.

Best regards.

Luis.

Hello,
if you want to add an icon into a rows of a left part of the gantt, then you can add a custom column, e.g.
JS:

[code]gantt.config.columns = [
{name:“buttons”, width:‘30’, align: “center”, template: function(task){
return “


}},

{name:“text”, tree:true, width:’*’, resize:true },
{name:“start_date”, align: “center”, resize:true },
{name:“duration”, align: “center” },
{name:“add”, width:‘44’ }
];[/code]
CSS:

.custom_button{ background: red; width:16px; height:16px; border-radius: 8px; margin-top: 8px; }

Or, if you want to change the default icons, but only for specific tasks, you can define a css template for a task rows
docs.dhtmlx.com/gantt/api__gantt … plate.html

For placing icons inside a task bars, you can use a task_text template, it can return any html content
docs.dhtmlx.com/gantt/api__gantt … plate.html

Hello Aliaksandr,

I used an aditional collumn approach. It works like a charm.

Thanks.

Best regards.

Luis

For placing icons inside a task bars, you can use a task_text template, it can return any html content
docs.dhtmlx.com/gantt/api__gantt … plate.html

I dont get how this works. This is for the right side of the Gantt Chart, right?
I want to display icons inside of the task-bar, left-sided of the tasks title. I mean where the progress is displayed, to get more accurate.

Is this even possible with templates?

greetings John

Hi,

You also can use progress_text template to show icon. Please check different ways in the example:
docs.dhtmlx.com/gantt/snippet/cb55f5ef