Our state of the art Gantt chart


Post by sachidanand »

I have a list of resources, and I want to group them based on a condition.
I found one reference in the bryntum gantt resource initialization example. https://www.bryntum.com/examples/gantt/resourceassignment/
I tried that but that also does not work(attaching the image), is there something we need to specify in the html?
I need to differentiate between two types of resources, how can i do that?
I wanted something like :

picker: {
                            width: '650px',
                            unitsColumn: { hidden: true },
                            features: {
                                filterBar: true,
                                group: record.isInternal ? 'A' : 'B'
                                headerMenu: false,
                                cellMenu: false
                            }
Attachments
img.PNG
img.PNG (27.94 KiB) Viewed 415 times

Post by alex.l »

Check docs https://bryntum.com/docs/gantt/api/Grid/feature/Group
You can pass a function and implement a logic you need in there

        group       : {
            field       : 'city',
            groupSortFn : (a, b) => a.city.length < b.city.length ? -1 : 1
        }

All the best,
Alex


Post by pawel »

Does it still work, or did it ever? I just tried to do it with your trial examples and it seems to be doing absolutely nothing.

examples/resourceutilization/app.module.js

Screenshot 2023-02-08 at 13.42.21.jpg
Screenshot 2023-02-08 at 13.42.21.jpg (70.43 KiB) Viewed 343 times

Post by alex.l »

May the reason be that you used feature instead of features in your config?

All the best,
Alex


Post by pawel »

It made no difference

Screenshot 2023-02-08 at 14.27.12.jpg
Screenshot 2023-02-08 at 14.27.12.jpg (168.21 KiB) Viewed 337 times

Post by arcady »

Currently resource utilization view uses a hardcoded two level store implemented with ResourceUtilizationStore class. It must be really tricky to customize the view grouping now. It would require overriding some private code I guess.

FYI We are refactoring this class and the resource histogram now to allow them to use existing group and treegroup features. The work is almost done (now it's on covering with tests and documenting stage) and we plan to finish in Q1. So please stay tuned.


Post by pawel »

Thanks! Then I'll just check this again in a few months


Post Reply