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

Define available hours in Gantt chart to allow proper usage of hour-tasks #1555

Open
mxschons opened this issue Jul 20, 2020 · 9 comments
Open
Labels

Comments

@mxschons
Copy link

Is your feature request related to a problem? Please describe.
I want to use the Gantt chart for both tasks that will stretch over multiple days and some that only last for hours. Currently days last 24h which leads to 6 4h tasks in one day when they follow each other sequentally. It seems reasonable to only have 8 available hours per day for task planning (or something in this area). So in summary working with tasks that last hours will create wrong estimates for when I will finish my tasks

Describe the solution you'd like
I would like to be able to set my available hours per day e.g. 2, 4, 8 or 12 (ideally for each day) and define how many hours a 1day task has. The benefit here is that it would scale well with smaller projects that only have been allocated x hours. I could see for instance, that a 1d task (defined with 1d = 8h) would stretch over 2 days in a 4hour work day chart.

Describe alternatives you've considered
Alternatives include allowing me to write "0.5d" or "0.25d" instead. I could think of my 4 hour task as a 0.5 day task and Mermaid in the background generates a 12h block. Similarly for 2h and 0.25 days => 6h block. This would probably be an easier fix but will lack customizability.

Additional context
Professional Gantt chart software often has these capabilities and it creates a much better planning experience.

@mxschons mxschons added Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request labels Jul 20, 2020
@riyaadh-abrahams
Copy link

HI

I was struggling with this and think I finally have it working

gantt
    title A Gantt Diagram
    dateFormat  YYYY-MM-DD HH:mm
    axisFormat %H:%M
    section Section
    A task             :a1, 2014-01-01 14:00, 270m
    Late Task          :done, 2014-01-01 13:00, 100m
    6 Hours task       :done, 2014-01-01 08:00, 6h

@revolter
Copy link
Contributor

Is the implementation needed for this complex?

@RobSeder
Copy link

RobSeder commented May 19, 2022

Example

Here's another example:

gantt
    title Project Planning by Person-Hours
    section Research
	    Vendor Research       :vr, 2022-05-15 08:00, 20h
	    Onboarding              :co, after vr, 15h
    section Consultant Work
	    Analysis              :a1, after co, 80h
	    Documentation         :after a1, 60h
Loading

with something like this for code:

gantt
    title Project Planning by Person-Hours
    section Research
	    Vendor Research       :vr, 2022-05-15 08:00, 20h
	    Onboarding            :co, after vr, 15h
    section Consultant Work
	    Analysis              :a1, after co, 80h
	    Documentation         :after a1, 60h

So, the idea is that you'd want to say "this item will take 20 hours" which means 20 WORKING hours, meaning 8 hours a day typically. Or for people on a 4 Day Workweek, a 10-hour work day. So, being able to set working hours for the exclude property would be useful for sure.

However, how it currently works is this seems to count full, 24-hour days, as if the worker is working 24-hours per day.


Potential Solution

What comes to mind for me, which would likely be the easiest to implement, but not the most elegant - is to just allow setting working hours by day of week. For example:

gantt
    title Project Planning by Person-Hours
    weekstartday Sunday
    availablehours 0,8,8,8,8,8,0
    ...

@thiagoolsilva
Copy link

@RobSeder any update for your solution? I'd love to solve this problem but I don't have any success to solve the related problem with my Gantt diagram.

@RobSeder
Copy link

RobSeder commented Feb 6, 2023

@thiagoolsilva no, sorry. This is going to have to be something that is supported in the library, itself. I don't have any workarounds either.

@thiagoolsilva
Copy link

Thanks

@jgreywolf
Copy link
Contributor

This is approved, but we need someone to take it on :)

@jgreywolf jgreywolf added Contributor needed Status: Approved Is ready to be worked on Graph: Gantt and removed Status: Triage Needs to be verified, categorized, etc labels Mar 8, 2023
@robinfehr
Copy link

that would be very useful indeed! i just found out that isn't working after I've put in quite some time into a bigger chart - wrongfully assuming thus far that this for sure must be a default feature.

@kraxner
Copy link

kraxner commented Jul 8, 2024

This seems to be related to #4060, and in this case will be resolved as well by #5403

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

No branches or pull requests

8 participants