1

I have a graph I build in grViz looking like so:


    grViz("digraph flowchart {
      node [fontname = Helvetica, shape = rectangle, fixedsize = false, width = 1]
      1 [label = 'Initial Cohort - ']
      2 [label = 'Left After Reduction - ']
      3 [label = 'Group 1']
      4 [label = 'Group 2']
      5 [label = 'Group 3']
      m1 [label = 'Excluded: \\l -Reason 1 - X \\l -Reason 2 - Y']
      node [shape=none, width=0, height=0, label='']
      p1 -> 2;
      {rank=same; p1 -> m1}
    
      edge [dir=none]
      1 -> p1;
      2 -> 3
      2 -> 4
      2 -> 5
    }")

enter image description here

I want to build the same graph in Mermaid but I can't seem to find the way to make a sidways node in a TD graph without having a subgraph that has visible borders

Any ideas?

Edi Itelman
  • 423
  • 5
  • 14
  • Could you please include the code you have used when building the graph in Mermaid? – Peter Jul 11 '20 at 13:36
  • @Peter I was not successful in building it in mermaid so I did not save any code, but the is like a basic TB graph and I can't seem to find the way to have one bar set off to the side – Edi Itelman Jul 11 '20 at 13:50
  • OK, just to help with my own ignorance, what does TB stand for. I'm familiar with the term 'flow chart' for these sort of graphs. Were you using the DiagrammeR package? – Peter Jul 11 '20 at 13:56
  • Yes, In mermaid TD (Sorry, my mistake) stands for Top-Down, The basic flow chart in mermaid will be: graph TD; A-->B; B-->C; C-->D; – Edi Itelman Jul 11 '20 at 14:31
  • I've not found a way to add a branch: it does not seem to be possible except as you not using a subgraph. An alternative is to insert text in the connector but I've not been able to wrap text. You may have bumped into the limits of Mermaid. – Peter Jul 11 '20 at 15:40
  • It is not currently possible to do this in mermaidJS. – Justin Greywolf Dec 11 '20 at 00:06

0 Answers0