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 chart: section titles not vertically centered in row #6123

Open
daixtrose opened this issue Dec 11, 2024 · 1 comment
Open

gantt chart: section titles not vertically centered in row #6123

daixtrose opened this issue Dec 11, 2024 · 1 comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@daixtrose
Copy link

daixtrose commented Dec 11, 2024

Description

When I create a gantt chart, sometimes the sections titles are not at the expected place, i.e. they are not vertically centered in the corresponding row. The drift worsens for larger charts.

Steps to reproduce

Create a gantt chart using the code below.

Screenshots

image

Code Sample

gantt
    title Plan
    dateFormat  YYYY-MM-DD
    excludes 2025-01-01, 2025-03-03, 2025-04-18, 2025-04-21, 2025-05-01, 2025-05-29, 2025-06-09, 2025-06-19, 2025-10-03, 2025-11-01, 2025-12-22, 2025-12-23, 2025-12-24, 2025-12-25, 2025-12-26, 2025-12-29, 2025-12-30, 2025-12-31, 2026-01-01, Weekends
	weekday monday
    tickInterval 1week
    axisFormat %d/%m

    section Q1
    Sprint 190       :sprint190, 2025-01-28, 15d
    Sprint 191       :sprint191, after sprint190, 14d
    Sprint 192       :sprint192, after sprint191, 15d
    Sprint 193       :sprint193, after sprint192, 13d

    section Holidays
    Easter Holidays :crit, easterHolidays, 2025-04-12, 2025-04-26
    
    section Q2
    Sprint 194       :sprint194, after sprint193, 14d
    Sprint 195       :sprint195, after sprint194, 14d
    Sprint 196       :sprint196, after sprint195, 13d
    Sprint 197       :sprint197, after sprint196, 15d
    	
    section Holidays
    Summer Holidays :crit, summerHolidays, 2025-07-12, 2025-08-26

Setup

  • Mermaid version:
    • Tested on current online version
  • Browser and Version:
Google Chrome | 131.0.6778.86 (Official Build) (64-bit) (cohort: Stable) -- | -- Revision | ee338c5c68e930761e15c97f5af9d8a082271a88-refs/branch-heads/6778@{#2286} OS | Windows 10 Version 21H2 (Build 19044.4529)

Suggested Solutions

No response

Additional Context

No response

@daixtrose daixtrose added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Dec 11, 2024
@daixtrose
Copy link
Author

On a larger project I can see that the distance between the section labels is equidistant. That makes no sense when the sections have a varying number of items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

1 participant