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.69k stars 6.07k forks source link

Bad Gantt Chart Will Cause UI to Hang #5496

Open juansc opened 2 months ago

juansc commented 2 months ago

Description

When I paste the following into a mermaid chart renderer it freezes.

gantt
    tickInterval 1second
    dateFormat ss
    axisFormat %s

    section Network Request
    RTT : rtt, 0, 20

I read this as "Draw a gantt chart with 1 second granularity for a twenty second time interval". I'm not sure what's causing the loop.

Steps to reproduce

Paste

gantt
    tickInterval 1second
    dateFormat ss
    axisFormat %s

    section Network Request
    RTT : rtt, 0, 20

into https://develop.git.mermaid.live

Screenshots

No response

Code Sample

No response

Setup

Suggested Solutions

Maybe it can return an error indicating that the expected time window is too big?

Additional Context

No response