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

Gantt diagram with days of the week instead of specific dates #740

Closed
simondorfman opened this issue Oct 8, 2018 · 4 comments
Closed

Gantt diagram with days of the week instead of specific dates #740

simondorfman opened this issue Oct 8, 2018 · 4 comments
Labels
Type: New Shape Request for new shape

Comments

@simondorfman
Copy link

I want to create a Gantt diagram to illustrate a bi-weekly process. So instead of specific dates showing along the bottom. I want to show generic days of the week (Sunday - Saturday) for two weeks. Is it possible to do that right now?

Looking at the docs here:
https://mermaidjs.github.io/gantt.html
...and it doesn't look like it.

@chuyuanlinzi
Copy link

I have the same question.

@PhilippeVay
Copy link

PhilippeVay commented Apr 9, 2019

You can use the axisFormat keyword and the many parameter values are those of scale in documentation.

EDIT: relevant PR for documentation is mermaidjs/mermaid-gitbook#19

@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
mgenereu pushed a commit to mgenereu/mermaid that referenced this issue Jun 25, 2022
@tim-elmer
Copy link

This issue does not seem to have been answered. While documentation of the axis output format makes it fairly clear how to only output weekdays and week numbers (e.g. %A %W -> Tuesday 2), it isn't clear how to input data in this level of detail. Reading the documentation, especially for Day.js formatting, I am skeptical that this is even possible.

If I understand @simondorfman's question correctly, they want to be able to describe two hypothetical weeks and events on days within those weeks. As Day.js appears to not support abstract dates (dates missing parameters are assumed to be relative to "now"; e.g. the first of April is interpreted as the first of April, this year), I don't think Mermaid.js is capable of handling schedules in this fashion.

As a workaround, one could pick a specific year/month (September 2024 lines up conveniently, with the 1st being a Sunday) and use dates within it (e.g. 09/02/24 is Monday), but this isn't ideal - especially from a code legibility standpoint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: New Shape Request for new shape
Projects
None yet
Development

No branches or pull requests

4 participants