Open purocean opened 2 years ago
This feels like a potential security issue of sorts, completely locks up the browser tab
Just ran into this over the weekend and would like to give it a bump. It's a massive usability issue when what you're trying to do surrounds a year boundary. Any time you have a "2023" you need to change to a "2024", if you backspace the "3", you run the risk of the entire tab crashing.
There was a test that was created while we were trying to address this issue. Unfortunately, changes didn't work as expected, so that the issue is still relevant, the test fails:
gantt
title A long Gantt Diagram
dateFormat YYYY-MM-DD
axisFormat %m-%d
tickInterval 1day
excludes weekends
section Section
A task : a1, 9999-10-01, 30d
Another task : after a1, 20d
section Another
Task in sec : 2022-10-20, 12d
another task : 24d
Because the problem is still present we will comment out this test, and later one any contributor can give it a shot and try fixing it.
To Reproduce Steps to reproduce the behavior: Rendering a Gantt chart with a large time span.
Expected behavior Limit the maximum time span to avoid getting stuck.
Screenshots
Code Sample
https://mermaid.live/edit#pako:eNptzUEKgzAQheGrhFlH0EChZGdpT9DtbAYz2oCZlDgWinj3Coqr7h4_H7wFuhwYPAwkqigTdxqzmBalNb4rUS1t5cPWmMBTY42rnavqa1U39pwXlNsf7XZ94IACFhKXRDFsjwuKMQj64sQIfpuBe5pHRUBZNzq_Ayk_QtRcwPc0TmyBZs3Pr3Rn2NU90lAoHXX9AbkhRCI
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
https://github.com/mermaid-js/mermaid/blob/c20c36255724f51f1d94b28611c51f86b1929f0f/src/diagrams/gantt/ganttRenderer.js#L436