zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.14k stars 1.9k forks source link

(Bug report) Mermaid Gantt Chart too wide #4340

Open woifes opened 12 months ago

woifes commented 12 months ago

Trilium Version

0.60.4

What operating system are you using?

Other Linux

What is your setup?

Server access only

Operating System Version

Hosted on Arch Linux with Docker

Description

I am not sure how this is connected because in my google search I see other tools which are using mermaid diagrams which have the same problem (so maybe this is a problem/feature of mermaid itself): If I add a gantt chart then it is not set on the viewport width. I am 100% sure there is a workaround with CSS but I tried around a bit and could not get it working. It would be ok for me if this is global to my notes. Could you guid me a bit in the right direction?

Error logs

No response

zadam commented 12 months ago

Hi, yeah, it looks to be a mermaid problem but as you say it's possible to workaround with CSS:

.mermaid-render svg {
    width: 95%; 
}

Fixed in the 0.61 branch.

woifes commented 12 months ago

Thank you very much! It works like a charm but I now see the problem: If you squash the Gantt chart so hard, the text inside the bars is no more readable (especially when you have a long overall time range). Is the "width: 95%" workaround the fix in the named branch?

zadam commented 12 months ago

You can zoom into the diagram with a mousewheel.

Is the "width: 95%" workaround the fix in the named branch?

Yes.