Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to draw arrow from node to nothing?

I'm trying to draw a simple Diagram in DiagrammeR::mermaid that should looks like:

 mermaid("
     graph LR
     A(Sample Text)
     -->A
     A-->B
     B-->A 
     B-->
  ")

Obviously (or not) -->A and B--> code doesn't work. It's not possible to have an arrow going or coming from nowhere.

Is there a simple work around (blank node ? / invisible node ?)

like image 671
TiFr3D Avatar asked May 10 '18 08:05

TiFr3D


1 Answers

How about this?

library(DiagrammeR)

mermaid("
     graph LR
        START[ ]-->A[Sample Text]
        A-->B
        B-->A 
        B-->STOP[ ]

        style START fill:#FFFFFF, stroke:#FFFFFF;
        style STOP  fill:#FFFFFF, stroke:#FFFFFF;
        ")

Output diagram is:

enter image description here

like image 75
1.618 Avatar answered Sep 22 '22 07:09

1.618