5

When I create mermaid flowcharts the horizontal padding between the text and the node border is big so that the nodes look unreasonably wide. There, furthermore, is this strange empty line below the text. All in all it does not look very balanced. What is the reason for this and how can I adjust the padding (in the mermaid docs something like this does not happen).

graph TD;
  a("Submission by author(s)") --> b("Review by editors")
  b --> c("Content revision by author(s)") --> d("Formatting by author(s)")

enter image description here

Cutú Chiqueño
  • 855
  • 1
  • 10
  • 24
  • Where are you using mermaid at? If I use the markdown you supplied above in the live editor (https://mermaid-js.github.io/mermaid-live-editor/) I am not seeing the same as what you posted (https://mermaid.ink/img/eyJjb2RlIjoiZ3JhcGggVEQ7XG4gIGEoXCJTdWJtaXNzaW9uIGJ5IGF1dGhvcihzKVwiKSAtLT4gYihcIlJldmlldyBieSBlZGl0b3JzXCIpXG4gIGIgLS0-IGMoXCJDb250ZW50IHJldmlzaW9uIGJ5IGF1dGhvcihzKVwiKSAtLT4gZChcIkZvcm1hdHRpbmcgYnkgYXV0aG9yKHMpXCIpIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifSwidXBkYXRlRWRpdG9yIjpmYWxzZX0) – Justin Greywolf Dec 10 '20 at 23:48

2 Answers2

0

<br/> will move text to next line, hope that solves your problem, please find below sample code.

graph TD
A["this is big text, in one line"] --> B["line one <br/>line two"]
Mohnish
  • 1,010
  • 1
  • 12
  • 20
  • no, unfortunately this is not what I meant. I do not need a second line, I want to eliminate the empty second line that, aesthetically speaking, mermaid seems to put below my text line automatically - but only when I use it. In the docs everything looks fine. – Cutú Chiqueño Sep 09 '20 at 20:19
0

I found this maybe a mermaid bug.If you want display normal,just change your complute display setting. win10:desktop->display setting->Change the size of text,apps,and other items. Find value and modify to 100%,then reopen your document.

Lamyee
  • 47
  • 5