Currently the gnatt chart doesn't exclude weekends. Or if it does, it's not documented any where.
Could this functionality be added easily?
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
This should be a MUST HAVE function for gantt. If anyone has the solution, please post it here, thanks.
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.
I concur that 5-day week planning is a must.
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.
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.
not being able to exclude weekends is a deal breaker.
Please implemented this feature, thanks!
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?
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).
@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.
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? https://github.com/knsv/mermaid/issues/269#issuecomment-373229136
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.
Any progress?
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
This function is very important of exclude weekends.
This function is very important of exclude weekends. We should make it more better.
still not with it? gonna switch others.
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.
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
...
This functionality has still not been documented.
Most helpful comment
For those who still read this issue, it has been fixed by #792, but not documented.
Add this in your gantt definition: