mermaid icon indicating copy to clipboard operation
mermaid copied to clipboard

Gantt graph not showing a bar if ending year is before 1000AD

Open duffercn opened this issue 1 year ago • 1 comments

Description

I tried to place some historical events on the gantt chart to facilitate understanding, but I find that only when the ending year is greater than 1000AD, the bar will show, otherwise, only text will show in the beginning of the position, but no bar is shown. examples as below: I tried many different platforms, and all are the same.

image

Steps to reproduce

just put this code into any interpreter.

gantt
    dateFormat  YYYY
    title       years

    section celebrity
    Event1          :done, p1, 998, 999
		Event2          :done, p2, 998, 1000
    Event3          :done, p3, 1000, 1001
    Event4          :done, p4, 1000, 1002

Screenshots

image

Code Sample

No response

Setup

  • Mermaid version:
  • Browser and Version: [Chrome, Edge, Firefox]

Suggested Solutions

No response

Additional Context

No response

duffercn avatar Jan 08 '24 04:01 duffercn

I can confirm this issue:

gantt
    title A Gantt Diagram
    dateFormat YYYY
    section Section
        Mr. Hanif           :a1, 0699, 1000
        Mr. Malek           :a2, 0715, 1000
    section Another
        Mr. Hanif           :a1, 0699, 0999
        Mr. Malek           :a2, 0715, 0999
        Mr. Malek           :a2, 990, 1000

damascene avatar Apr 03 '24 03:04 damascene