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 documentation for milestones in Gantt diagram #1367

Closed
digulla opened this issue Apr 23, 2020 · 9 comments · Fixed by #2419
Closed

Add documentation for milestones in Gantt diagram #1367

digulla opened this issue Apr 23, 2020 · 9 comments · Fixed by #2419
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request

Comments

@digulla
Copy link

digulla commented Apr 23, 2020

PR #788 added milestones but the documentation how to use them is still missing.

I looked at the PR and I can't figure out how that feature is supposed to work.

@digulla digulla added Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request labels Apr 23, 2020
@kut
Copy link

kut commented May 12, 2020

I think milestones were added with #788?

@digulla
Copy link
Author

digulla commented May 19, 2020

Yes. I'll rephrase my ticket :-)

@digulla digulla changed the title Support for milestones in Gantt diagram Add documentation for milestones in Gantt diagram May 19, 2020
@digulla
Copy link
Author

digulla commented May 19, 2020

I tried to create an example but the flag "milestone" doesn't seem to have an effect (at least not on the online editor):

gantt
	title A Gantt Diagram
	dateFormat  YYYY-MM-DD
	section Section
	A task           :a1, 2014-01-01, 30d
  M1 :after a1, milestone
  M2 :after a1
	Another task     :after a1  , 20d
	section Another
	Task in sec      :2014-01-12  , 12d
	another task      : 24d
	

@gkTim
Copy link

gkTim commented Jun 9, 2020

To add a milestone to your diagram add this:

My milestone :milestone, m1, 2020-06-09, 1d

The 1d is necessary so the milestone position is correct.

@obstschale
Copy link

hey, I just found this issue. Do you need help documenting it? If I wouldn't have googled milestones for mermaid, I would never have found this gem.

@obstschale
Copy link

obstschale commented Apr 24, 2021

I am a little bit confused. It seems that the milestone feature is not working properly. Check this out:

I use the gantt chart from the documentation:

gantt
    dateFormat  YYYY-MM-DD
    title       Adding GANTT diagram functionality to mermaid
    excludes    weekends
    %% (`excludes` accepts specific dates in YYYY-MM-DD format, days of the week ("sunday") or "weekends", but not the word "weekdays".)

    section A section
    Milestone                 :milestone, 2014-01-06, 1h
    Completed task            :done,      des1, 2014-01-06,2014-01-08
    Milestone                 :milestone, after des1, 1h
    Active task               :active,    des2, 2014-01-09, 3d
    Future task               :           des3, after des2, 5d
    Milestone                 :milestone, after des3, 1h
    Future task2              :           des4, after des3, 5d

    section Critical tasks
    Completed task in the critical line :crit, done, 2014-01-06,24h
    Implement parser and jison          :crit, done, after des1, 2d
    Create tests for parser             :crit, active, 3d
    Future task in critical line        :crit, 5d
    Create tests for renderer           :2d
    Add to mermaid                      :1d

    section Documentation
    Describe gantt syntax               :active, a1, after des1, 3d
    Add gantt diagram to demo page      :after a1  , 20h
    Add another diagram to demo page    :doc1, after a1  , 48h

    section Last section
    Describe gantt syntax               :after doc1, 3d
    Add gantt diagram to demo page      :20h
    Add another diagram to demo page    :48h

CleanShot 2021-04-24 at 21 54 38

As you can see.

  • Number 1: Looks ok
  • Number 2: Text not properly positioned
  • Number 3: Text and symbol diverge

I think these Issues should be fixed before we add them to the documentation, don't you?

PS: I use 1h as length. Because 1d, as mentioned by @gkTim, will position the milestone after the date. 1h will position it on that date. Try 1w to see what I mean

@vic-t
Copy link

vic-t commented May 13, 2021

@obstschale I just ran the exact same markup on my system, I don't have the issues you mentioned.

image

@obstschale
Copy link

Interessing. Maybe a new version of mermaid fixed it? The mermaid live editor does exactly output your screenshot. But Gitlab and Notable still output the broken version. Unfortunatley, I cannot find out which versions of mermaid these softwares use.

@obstschale
Copy link

obstschale commented Jul 19, 2021

It seems that a new mermaid version fixed this issue. In GitLab the posted code works. Notable is still not updated.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants