Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add section scoped excludes to Gantt chart #5680

Open
daviewales opened this issue Jul 31, 2024 · 0 comments
Open

Add section scoped excludes to Gantt chart #5680

daviewales opened this issue Jul 31, 2024 · 0 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request

Comments

@daviewales
Copy link

Proposal

Current state

Currently, it's possible to exclude dates or days from Gantt charts with the excludes syntax.
For example, the following excludes weekends:

excludes weekends

This is usually specified at the start of the chart, but can also be specified within sections.
The last exclusion specified applies to all tasks in the chart. (Previous exclusions appear to be ignored)

Proposal

It would be good to enable section-scoped excludes.
This would allow you to specify a top-level exclude, and optionally separate excludes for each section.

For example, suppose different members on a team work on different days.
No-one works on weekends, Fred doesn't work on Mondays and Tuesdays, and Jane doesn't work on Wednesdays.
If each team-member is assigned a different section, this proposal would enable you to do something like the following:

Example

gantt
    title Team tasks
    dateFormat YYYY-MM-DD
    %% top level default exclude applies to all tasks
    excludes weekends

    section Fred
        % section-scoped exclude. Inherits top-level weekend exclusion, and additionally excludes monday, tuesday for Fred
        excludes monday, tuesday
        A task          :a1, 2024-01-01, 30d
        Another task    :20d

    section Jane
        % section-scoped exclude. Inherits top-level weekend exclusion, and additionally excludes wednesday for Jane
        excludes wednesday
        Task for Jane :2024-01-01, 30d
        Another task for Jane    :20d

Screenshots

Current output of above example code:

mermaid-diagram-2024-07-31-123015

What Fred and Jane's tasks should look like after proposed changes are implemented (sorry, wasn't sure the best way to align these correctly on one chart.):

mermaid-diagram-2024-07-31-123140

mermaid-diagram-2024-07-31-123202

Note that the end date for Fred and Jane's tasks are different, because Jane works more days than Fred, so she will finish sooner.
So, if we combine these Fred and Jane's tasks onto the same chart, Jane's tasks should finish just after the 2024-03-24 date marker, while Fred's should finish just after the 2024-04-21 date marker.

@daviewales daviewales added Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request labels Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant