Skip to content

Conversation

iaminamcom
Copy link

I was in need to add group so that I can add tasks to specify rows. I found #95 is still open and solutions there are working but not compatible with new version.
Here's an implementation which allow user to enable or disable grouping also fixes rows, lines issues.

What changed

You need to add following to options

new Gantt('.gantt-target', tasks, {
    enable_grouping:  true,
    // Other options...
});

and in tasks will be like

let tasks = [
    {
        start: '2024-03-30',
        duration: '12h',
        name: 'Write new content',
        id: 'Task 1',
        progress: 5,
        // important: true,
        group: 0,
    },
    {
        start: '2024-04-01',
        end: '2024-04-01',
        name: 'Redesign website',
        id: 'Task 0',
        progress: 30,
        group: 0,
    },
    {
        start: '2024-04-02',
        end: '2024-04-02',
        name: 'Apply new styles',
        id: 'Task 2',
        progress: 80,
        group: 0,
    },
    {
        start: '2024-04-04',
        end: '2024-04-04',
        name: 'Review',
        id: 'Task 3',
        progress: 5,
        group: 1,
    },
    {
        start: '2024-04-06',
        end: '2024-04-06',
        name: 'Deploy',
        id: 'Task 4',
        progress: 0,
        group: 1,
    },
];

@safwansamsudeen
Copy link
Collaborator

safwansamsudeen commented Dec 13, 2024

Hey, nice changes! If you can resolve the conflicts, we'd really appreciate it.

@iaminamcom
Copy link
Author

iaminamcom commented May 7, 2025 via email

@safwansamsudeen
Copy link
Collaborator

@iaminamcom your changes aren't aligned with the latest version of Frappe Gantt (we had major refactors after your PR).

As you can see here:
image

If you could update your PR to make sure there are no conflicts, I'd appreciate that.

@stonesoft-tech
Copy link

Will this be merged into the main branch? I'd love this feature.

@tommie1001
Copy link

Same here! Would love to use this to group projects and by this create an cross customer gantt planning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants