Skip to content

Gantt chart Vertical markers take up a row #7240

@schnuerle

Description

@schnuerle

Description

Gantt chart vertical markers area described here:

https://docs.mermaidchart.com/mermaid-oss/syntax/gantt.html#vertical-markers

The description explicitly states "Unlike milestones, vertical markers don’t take up a row. They’re purely visual reference points that help break up the timeline and make important moments easier to spot."

But vertical markers do take up a row. Where they are placed creates a row of white space on the resulting chart (even if compact mode is used).

In the example provided, I took the example from the docs and just added duplicate vertical rows at the start, middle, and end. You can see they pad out the chart.

They should not affect the spacing of the rows in a Gantt chart.

Steps to reproduce

Click here to see an example:

https://www.mermaidchart.com/play#pako:eNqrVkrOT0lVslJKT8wrKYnJUwCClMSSVLf8otzEEgUPD6vcXIhoYkVmMVRU1cNK1Rci6pmXWZKZmKNQllpUomAFpnQUygx1FAzNrYwNdBSMcoeXupDE4mwFR6AKY6iAb2ZKSk4qmj5jsD4TU4S-YaAM7HUnoAoLqIBbZh5GiBmBtZla6CiYDHlVMXlKtQBxQeJ-

Feel free to add or remove vert rows to see how the chart is affected.

Screenshots

See interactive example.

Image

Code Sample

gantt
    dateFormat HH:mm
    axisFormat %H:%M
    Initial vert : vert, v1, 17:30, 2m
    Initial vert : vert, v1, 17:30, 2m
    Initial vert : vert, v1, 17:30, 2m
    Initial vert : vert, v1, 17:30, 2m
    Initial vert : vert, v1, 17:30, 2m
    Initial vert : vert, v1, 17:30, 2m
    Task A : 3m
    Middle vert : vert, v3, 17:45, 2m
    Middle vert : vert, v3, 17:45, 2m
    Middle vert : vert, v3, 17:45, 2m
    Middle vert : vert, v3, 17:45, 2m
    Middle vert : vert, v3, 17:45, 2m
    Middle vert : vert, v3, 17:45, 2m
    Task B : 8m
    Final vert : vert, v2, 17:58, 4m
    Final vert : vert, v2, 17:58, 4m
    Final vert : vert, v2, 17:58, 4m
    Final vert : vert, v2, 17:58, 4m
    Final vert : vert, v2, 17:58, 4m
    Final vert : vert, v2, 17:58, 4m

Setup

  • Mermaid version: 11.12.2
  • Browser and Version: Chrome Version 142.0.7444.176 (Official Build) (arm64) on macOS 26.0.1 (25A362)

Suggested Solutions

  • Update display so vert is not added as a row

Additional Context

No response

Metadata

Metadata

Assignees

Labels

Status: TriageNeeds to be verified, categorized, etcType: Bug / ErrorSomething isn't working or is incorrect

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions