Our state of the art Gantt chart


Post by shaxo »

Hello,

We would like to know if there is a way to be able to assign an higher unit value to a resource than 100% ?
In our use cases, resource can be either TEAMS or INDIVIDUALS.
A team of 10 individuals, could have 1k% unit, for example.
Is there a way to be able to do such things ? As for today, it seems its limited to 100%.

Thank you.


Post by tasnim »

Hi,

You could extend the limit to 1000 like the following code

    features : {
        taskEdit : {
            items : {
                resourcesTab : {
                    items : {
                        grid : {
                            columns : {
                                data : {
                                    units : {
                                        max : 1000
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }

Please check these docs link
https://bryntum.com/products/gantt/docs/api/Gantt/feature/TaskEdit
https://bryntum.com/products/gantt/docs/api/SchedulerPro/widget/taskeditor/ResourcesTab
https://bryntum.com/products/gantt/docs/api/Grid/column/NumberColumn#config-max

I hope this is helpful.


Post by shaxo »

Hi Tasnim, thank you for your response.

With this approach, its editable only from the dialog menu, i would like to be able to do it also from cellEdit.

Also, would it be possible, onLoad, to automaticly calculate unit that isnt equals to 100% (lower or higher) ?

for example, if the base is 7 hours daily on a 5/7 calendar, and my task duration is 5 days.

Lets say the amount of effort is 70x5 = 350. which represent 70 effort daily. In such case, it should result into units being equals to 1k%.

What do you think ?


Post by tasnim »

Hi,

With this approach, its editable only from the dialog menu, i would like to be able to do it also from cellEdit.

Please check this thread viewtopic.php?p=123868#p123868
Isn't it what you are looking for?

To auto calculate on load, you could listen to this https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#event-load event
And inside this event, you add your condition
Maybe you could run a forEach loop on the assignmentStore to change units according to your condition

Example:

gantt.project.on('load', () => {
    gantt.assignmentStore.forEach(item => {
        item.units = 50;
    })
})

Docs
https://bryntum.com/products/gantt/docs/api/Gantt/data/AssignmentStore#function-forEach
https://bryntum.com/products/gantt/docs/api/Gantt/model/AssignmentModel#field-units


Post Reply