mjbvz / vscode-markdown-mermaid

Adds Mermaid diagram and flowchart support to VS Code's builtin markdown preview
https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid
MIT License
648 stars 119 forks source link

flowchat node too small #89

Closed vidyli closed 1 year ago

vidyli commented 3 years ago
graph TD
    Start --> Request
    Request -- validate raw data --> B[Raw data]
    B -- transform --> C[DTO]
    C -- validate business rules --> D[Domain model]
    D --> Stop
    Stop

Render using this plugin

image

Mermaid live editor

image

bowdi commented 3 years ago

I'm also seeing this issue!

graph TD
    a[Start] --> b[End]

image

jaudiger commented 3 years ago

I'm also facing the same issue. Any workaround until it's fixed ?

amberyli commented 3 years ago

I also have the same issue. Really annoying.

gitjeff05 commented 3 years ago

Kind of a hack, but overriding default style works for me:

classDef default font-size:12px

https://mermaid-js.github.io/mermaid/#/flowchart?id=default-class

example:

graph LR
    A[Filter] --> B((Circle))
    B --> D{Rhombus}

    classDef default font-size:12px
amberyli commented 3 years ago

@gitjeff05 thank you love! it did work for me last week. but this week, the output becomes weird once again. have to re-adjust the font size. hope they could figure it out quickly though

jroachgit commented 3 years ago

when I put in that code: classDef default font-size:12px I get a syntax error.

Jmuccigr commented 1 year ago

I'm seeing this problem when I simply use a style to increase the font size. The node box doesn't grow to fit the now larger text. Perhaps there's a simple fix for this in the style settings? (He wrote hopefully.)

mjbvz commented 1 year ago

Seems to work fine for me in the latest release at a range of zoom levels:

Screenshot 2022-12-05 at 6 41 52 PM

If you're still seeing issues, please open a new issue with the text of the diagram

Jmuccigr commented 1 year ago

This is easy to reproduce for me. Just include a larger font-size style:

classDef default font-size:14pt;

mjbvz commented 1 year ago

Please share a complete example

Jmuccigr commented 1 year ago

Sure. As I said, take the example from above and add the new line with a change to the font-size. Now the text is too big for the boxes:

graph TD
Start --> Request
    Request -- validate raw data --> B[Raw data]
    B -- transform --> C[DTO]
    C -- validate business rules --> D[Domain model]
    D --> Stop
    classDef default font-size:14pt;
Stop

image