Mermaid Gantt diagrams are slighly wider than pane


I use the new day planner plugin to generate a task overview, but I don’t think the issue is with the plugin. It creates a mermaid gantt diagram like the following:

    dateFormat  HH-mm
    axisFormat %H:%M
    section Tasks
	Break     :11-00, 15mm
    Work     :11-15, 45mm
    Small    :12-15, 15mm
    Work     :12-30, 60mm
    Work     :14-30, 45mm
    Work     :15-30, 45mm
    Work     :16-30, 30mm
    Cleanup     :17-00, 30mm
    END     :17-30, 0mm
    section Breaks
    BREAK     :12-00, 15mm
    BREAK     :13-30, 60mm
    BREAK     :15-15, 15mm
    BREAK     :16-15, 15mm

I’ve disabled all plugins and custom css for this screenshot:

As you can see, there is a scrollbar and the gantt diagram is slightly too wide. Resizing the window fixes this:

Until the diagram is re-rendered:

it would really be helpful if you followerd the template, with no css an not third party plugins

Hi, sorry for not following the template. It seemed my bug would be more easily understood from the three screenshots I posted, but I’ll use the template in the future.

The screenshots are with no custom css, but to be really sure, I just created a new empty vault and just copied the mermaid diagram. The result is the same:

The fact that it is wider than the pane is not an error. We actually changed the behaviour recenltly to not be constrained by the pane size.
If the graph gets larger when you resize the pane, we have problem.

My graph is always pretty big and doesn’t change in size.

It doesn’t get lager or smaller, it always remains the same size unless it is rendered again. Like upon window reloads. Then, it always is just a little larger than the pane, regardless of pane or window size. If I make the window larger or smaller then, the graph remains at the same size.

It is affected by the “readable line length” option though, or at least it’s placement is.

I agree that the mermaid graph should not be constrained by a too small pane, but surely once some minimal width is reached the graph should just fit to the pane width? And as I said, it’s always too wide, regardless of graph or window size.

I agree there is something odd here. Working with mermaid has been frustrating for us.


shoud be fixed next release 0.9.14

1 Like