mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
68.75k stars 6.08k forks source link

Gantt diagram states that is supports quarter in `date format` while it does not #5231

Open lexa-diky opened 5 months ago

lexa-diky commented 5 months ago

Description

In Gantt diagram documentation it states that Quarter dates are supported, while it is not. Day.js also has no mentioning of quarter support in the linked documentation https://day.js.org/docs/en/parse/string-format/

Steps to reproduce

  1. Use code in Code Sample section
  2. Q formatted numbers are formatted as month

Screenshots

Screenshot 2567-01-24 at 11 51 23

Code Sample

gantt
    title my-project
    dateFormat YYYY-Q
    axisFormat %Y %b
    section Section
        A task : 2023-4, 2024-1

Setup

Suggested Solutions

Additional Context

No response

OldhamMade commented 4 months ago

Upvote for option 2: to implement Q support.

Amit0617 commented 6 days ago

You are using it wrong. Use it like 2020-Q1 for first quarter of 2020. Read the docs http://mermaid.js.org/syntax/gantt.html#output-date-format-on-the-axis

mmyrte commented 2 days ago

@Amit0617 You're referring to the output, whereas we want the input to be parsed as quarters.