Duration of gantt chart


I am trying to change the duration from code on change of some custom field value but the value is not reflecting in DOM(i.e not able to see the refreshed gantt chart)


Hello Sushma,
The end_date parameter has a higher priority over the duration parameter. So, when you only update the duration parameter, the end_date is not updated. You need to manually update it with the calculateEndDate method:
Then you need to call the updateTask method to repaint the changes:
Here is an example: