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

'Milestone' markers of Mermaid gantt chart placed incorrectly #5704

Closed
3 tasks done
mushix64 opened this issue Apr 19, 2023 · 1 comment
Closed
3 tasks done

'Milestone' markers of Mermaid gantt chart placed incorrectly #5704

mushix64 opened this issue Apr 19, 2023 · 1 comment

Comments

@mushix64
Copy link

  • Searched existing issues to avoid creating duplicates.
  • Confirmed that it can be reproduced in built-in themes without customized css.
  • Searched http://support.typora.io/

Describe the bug

  • In Mermaid gantt chart, milestone markers are rendered out of alignment with their actual position.
  • Only the marker displayed on the screen is incorrect. Markers in the output file correctly placed in all formats.
    • Compared to the correct placement in the output file, the text is positioned correctly, only the markers are misaligned.
  • Misalignment is not only left to right, but also up and down.
    • As the number of milestone markers increases, they will overhang the lower section.

To Reproduce

  1. create a Gantt chart
  2. place milestones with desired dates and durations
  • place multiple milestones
  • also create another section and chart below the milestone section
  1. the milestones are displayed out of alignment.
  2. output the displayed chart to a file and compare it with the screen display.

Expected behavior
Milestone markers on screen are placed correctly, as the below reference (https://mermaid.js.org/syntax/gantt.html - milestone section)

As you may notice, the exact location of the milestone is determined by the initial date for the milestone and the "duration" of the task this way: initial date+duration/2.

Screenshots / Screencasts

  • Output file (correct placement)
    gantt chart - output (correct)

  • On screen (wrong placement)

gantt chart - screenshot (wrong)

Sample Markdown File
(same as issue #5092 )

```mermaid
gantt
dateFormat  YYYY-MM-DD
title All items changes to protect the innocent
excludes weekends

section Deliveries
Receive Cables            : milestone, cables, 2022-03-01, 1h
Receive Things x11    : milestone, recvx11, 2022-03-07, 1d
Receive Things x12    : milestone, recvx12, 2022-03-14, 1d
Receive Things x13    : milestone, recvx13, 2022-03-21, 1d

section Setup Connection
Connect A to B  : ab, after cables, 1d
Connect A to C  : ac, after cables ab, 1d

section Setup C
Move things         : mvwn, 2022-03-01, 1d
Install Recipe : recipe, after mvwn, 5d

section Connection
Connect x11 to C : x11, after recvx11, 1d
Connect x12 to C : x12, after recvx12, 1d
Connect x13 to C : x13, after recvx13, 1d

Run something                       : sth, after x13, 10d

Desktop (please complete the following information):

  • macOS Ventura 13.3.1

Typora Version

  • 1.15.13 (6766)
@abnerlee
Copy link
Contributor

Seems fixed in v1.6 already

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants