Where is the code for creating a new task in gantt


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


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


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?


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; });

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