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

Gnatt Chart exclude weekends #314

Closed
scchearn opened this issue Mar 7, 2016 · 21 comments · Fixed by #1303
Closed

Gnatt Chart exclude weekends #314

scchearn opened this issue Mar 7, 2016 · 21 comments · Fixed by #1303

Comments

@scchearn
Copy link

scchearn commented Mar 7, 2016

Currently the gnatt chart doesn't exclude weekends. Or if it does, it's not documented any where.

Could this functionality be added easily?

@knsv knsv added the Type: Other Not an enhancement or a bug label Mar 7, 2016
@knsv
Copy link
Collaborator

knsv commented Mar 7, 2016

Mermaid uses the d3 to render the axis and it is possible to provide a custom axis formatter into mermaid for locale specific purposes. If it is possible to setup an an timescale formatter in such a way in d3 this should be possible. Not sure about the specifics though. A pointer in the right direction:

https://github.com/mbostock/d3/wiki/Time-Formatting
http://stackoverflow.com/questions/15471224/how-to-format-time-on-xaxis-use-d3-js

Good luck! If you find a solution please post it here for reference.

Thanks

@surfingtomchen
Copy link

This should be a MUST HAVE function for gantt. If anyone has the solution, please post it here, thanks.

@dannystaple
Copy link

I can see the x axis is created here https://github.com/knsv/mermaid/blob/master/src/diagrams/gantt/ganttRenderer.js - but the scale override needs passing through there. As it is - not useful for work of over a week.

@jeffvautin
Copy link

I concur that 5-day week planning is a must.

@Loda
Copy link

Loda commented Jan 16, 2017

Hi knsv,

your project is very interesting, and I would love to use it more.

But I need to exclude the week-end (and other holidays) from the grantt.

also, the time axis can be improved by include the actual date the tasks will start.

@heartsucker
Copy link

Piling on this too. I think a good way to include this would be something like exclude weekends or also exclude weekends 2017-04-14 2017-04-17 so additional dates could be punched in.

@pbhogale
Copy link

not being able to exclude weekends is a deal breaker.

@chaoslawful
Copy link

Please implemented this feature, thanks!

@svperfecta
Copy link

Sorry - But there are six people here asking for a feature, and the maintainer noted exactly where to find the code and fix it. If you need it this badly, send a pull request?

@monomon
Copy link

monomon commented Oct 11, 2017

I did look at this some time ago, but couldn't find a good way of creating a discontinuous scale.
Apparently there is a library for this though, which can be used for inspiration or added as a dependency (I'm guessing this option wouldn't delight many people).

@heartsucker
Copy link

@genexp That's a somewhat useless comment as the point of a maintainer is to... maintain a repository. Also, I don't know JS. Also, I use this as a CLI and not as a lib, so that doesn't exactly help me.

@tylerlong
Copy link
Collaborator

tylerlong commented Mar 15, 2018

Why do you mean by excluding weekends? Time is continuous. Just don't show the date on xAxis? But the date is still there because time has no "gaps".

Does this feature help? #269 (comment)

@pixystone
Copy link

pixystone commented Mar 19, 2018

What about supporting workday?

e.g. A work item start from Tuesday of this week, and it takes 5 workdays, then it will end at next Monday instead of Saturday.

@lenicliu
Copy link

Any progress?

@z-george-ma
Copy link

If excluding weekends from x-axis isn't easily achievable, would it be possible to include weekends for time calculation? e.g. 3d on Friday will be Friday to the next Tuesday

@chuyuanlinzi
Copy link

This function is very important of exclude weekends.

@StarryF
Copy link

StarryF commented Apr 3, 2019

This function is very important of exclude weekends. We should make it more better.

@neuzhong
Copy link

still not with it? gonna switch others.

@stale
Copy link

stale bot commented Jun 29, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Type: New Shape Request for new shape label Jun 29, 2019
@JoanZapata
Copy link

For those who still read this issue, it has been fixed by #792, but not documented.

Add this in your gantt definition:

gantt 
    ...
    excludes weekdays saturday,sunday
    ...

@IOrlandoni
Copy link
Member

This functionality has still not been documented.

@IOrlandoni IOrlandoni added Area: Documentation Graph: Gantt Good first issue! and removed Type: New Shape Request for new shape Type: Other Not an enhancement or a bug labels Sep 23, 2019
@IOrlandoni IOrlandoni added Contributor needed Type: Enhancement New feature or request Retained Nonperishable labels Sep 23, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Mar 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.