Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mermaid diagram line break

I cannot find how to insert a line break in long titles inside nodes. For example:

library(DiagrammeR)  mermaid(" graph TB      A[GE Solution]-->C{ }      B[GA Solution]-->C{ }       C{ }-->D[Stir 10 mins at 500 r/min]      D[Stir 10 mins at 500 r/min]-->E[Homogenisation at 10000 r/min]      E[Homogenisation at 10000 r/min]-->F(Stir 10 min 450 r/min Complex coacervation)       ") 

Note node F is too long. How to I make it into sth like..?

|Stir 10 min 450 r/min| |Complex coacervation | 

Note \n doesn't work.

like image 853
Scientist Avatar asked Jul 16 '18 16:07

Scientist


1 Answers

It appears you can use <br> instead:

mermaid(" graph TB         A[GE Solution]-->C{ }         B[GA Solution]-->C{ }          C{ }-->D[Stir 10 mins at 500 r/min]         D[Stir 10 mins at 500 r/min]-->E[Homogenisation at 10000 r/min]         E[Homogenisation at 10000 r/min]-->F(Stir 10 min 450 r/min <br> Complex  coacervation)         ") 

enter image description here

like image 130
Hack-R Avatar answered Oct 16 '22 21:10

Hack-R