Wanting to integrate a Gantt chart into a software, I wanted to test the pro evaluation version of DHTML, but I wanted to know if it is possible not to specify the duration for a task, but to calculated automatically the duration based on a Specified workload and resources allocated (capacity).
There is no built-in feature to calculate the duration using capacity and workload parameters. But you can try implementing your own solution.
You just need to define a formula and calculate the duration according to that formula.
Here is a snippet where you can see how it can be implemented:
The tasks don’t have the duration, but it is not correct unless these tasks are unscheduled. So we calculate the duration in the formula before loading tasks.
Later you can use “onAfterTaskUpdate” and other event handlers to update the duration: