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 displays section labels incorrectly (out of order) if one (or more) of the labels is a number #5732

Open
neel-m opened this issue Aug 21, 2024 · 0 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@neel-m
Copy link

neel-m commented Aug 21, 2024

Description

Using numbers for a section label causes sorting issues with the labels and the diagrams being out of order.

Workarounds:

  1. Use only numbers (that are strictly increasing)
  2. Use only labels that start with alpha characters and no labels that are just numbers

Steps to reproduce

Given this input:

gantt
    title Releases
    dateFormat YYYY-MM

    section ZZ
    Main Development1 :2024-06-01, 10d
    Release Branch: 5d
    Validate  : 1d
    Stage     : 1d
    Release : 1d

    section 501
    Main Development3 :2024-06-15, 10d
    Release Branch: 5d
    Validate  :2d

The labels are swapped on the sections.

Screenshots

No response

Code Sample

https://develop.git.mermaid.live/edit#pako:eNqVkEFrwzAMhf-K0TktlhM7nY-j7NbLCoONXESipaGJXRJnrCv973OalnWwy3SSPj_5PXSC0lcMFmpyIRROxApNaFk8c8s08DCzigI_-b6jIF5jLTabws0vA5eh8U4YKWewocaJNX9w6w8du4DCKqmyhTQLiYlAWc26q4F47MmVOyv0lb9Q20x2QliBV7YNVPPU3LHb_kx-h9ES_w6T_oRB_b8w6uICCXQc79BU8WinSVRA2HHHBdjYVtTvCyjcOepoDH57dCXY0I-cQO_Hegf2ndohTuNh-nfdUN1Td5McyL15fz-CPcEnWK2WWZrLmH31IDNM0wSOYI3EpdaYK6WMyVGvzgl8XfZxaeINcr0ymCmdpZidvwHX6JC-

Setup

  • Mermaid version: v10.9.1 (and v11.0.0-alpha)
  • Browser and Version: [Chrome, Edge, Firefox] Edge

Suggested Solutions

No response

Additional Context

No response

@neel-m neel-m added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Aug 21, 2024
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