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

Milestones in gantt charts do not have correct vertical positioning when followed by a task with an absolute start date #1651

Closed
mchernosky opened this issue Aug 26, 2020 · 3 comments · Fixed by #1911
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@mchernosky
Copy link

mchernosky commented Aug 26, 2020

Describe the bug
When creating a milestone followed by a task with an absolute start date, the milestone is moved down vertically by about 50% so that it overlaps the task.

To Reproduce
Here are three different charts with different configurations:

  1. Using a task instead of a milestone. This is drawn correctly:
    gantt
        title 1. Task with Fixed Start Task After
        dateFormat  YYYY-MM-DD
        Development: development, 2020-07-20, 2w
        Dev Complete: dev_complete, after development, 1d
        Verification: verification, 2020-07-24, 3w
  1. The problem condition. The milestone is drawn overlapping the task below:
    gantt
        title 2. Milestone with Fixed Start Task After
        dateFormat  YYYY-MM-DD
        Development: development, 2020-07-20, 2w
        Dev Complete: milestone, dev_complete, after development, 1d
        Verification: verification, 2020-07-24, 3w
  1. If the task following the milestone uses a relative start date the milestone is drawn correctly:
    gantt
        title 3. Milestone with Relative Start Task After
        dateFormat  YYYY-MM-DD
        Development: development, 2020-07-20, 2w
        Dev Complete: milestone, dev_complete, after development, 1d
        Verification: verification, after development, 3w

Expected behavior
I would expect the milestone drawn in chart 2 above to be about 50% higher and not overlap the task below it.

Screenshots
Here are the rendered charts:
mermaid-milestones

Desktop (please complete the following information):

  • OS: Windows/PopOS
  • Browser: Chrome, Brave
@mchernosky mchernosky added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Aug 26, 2020
@tmatthias29
Copy link

tmatthias29 commented Sep 1, 2020

I have the same issue and @mchernosky 's scenario #3 is also not rendering correctly in Firefox. Milestone appears way towards the bottom of the page.

In Chrome, issue is the same as reported above.

@CapitanPrimate
Copy link

Same problem here.

I tried this:

gantt
dateFormat  DD/MM/YY
Task 1 :active, 09/04/18, 30/10/20
Milestone 1 :milestone, 29/09/20, 1d
Task 2 :active, 11/11/19, 19/10/20
Milestone 2 :milestone, 30/09/20, 1d
Task 3 :active, 18/02/19, 10/07/20
Milestone 3 :milestone, 01/10/20, 1d
Task 4 :active, 11/03/19, 04/08/20
Milestone 4 :milestone, 11/10/19, 1d

and got this:
imagen

The milestone texts appear where they are supposed to, but the milestones themselves don't. Milestone 4 is supposed to appear closest to the bottom, but the earlier the date, the more it moves toward the upper left.

OS: macOS

I use mermaid-cli to generate the diagram.

@Rutorai
Copy link
Contributor

Rutorai commented Feb 26, 2021

Hello,
I had the same issue. I submit a really simple pull request ##1911 . Hopefully it will be validated :-)
Fix

@github-actions github-actions bot locked and limited conversation to collaborators Feb 27, 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: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants