Where is the code for creating a new task in gantt

Hi,

I can’t find where the code for creating a new task is in the dhtmlx gantt table, and I need to fix a bug where adding a new task initializes to Nan%

Thanks for the help

Hello,

You need to find gantt.addTask() function in the source code.

Hi,

I found the code where I can change the values as seen in the photos i sent, but there is not attribute for progress. Is progress generated after creating the task and has no initial value?






Hi,

To fix the issue you can set progress value t.progress=‘0’ or when onTaskCreated fires:

gantt.attachEvent("onTaskCreated", function(task){ task.progress = 0; return true; });
docs.dhtmlx.com/gantt/snippet/61db71aa

It works now. Thank you so much for the help!