I am trying to create in DiagrammeR the flowchart below.
Although I am using the concentrate=true
attribute option it appears that the edges cannot forced to overlap each other and have common arrow head.
Desired output enter image description here
I have tried the solution but the outcome is not what expected
DiagrammeR::grViz("
digraph box {
graph [label = '',
labelloc='t';
layout=dot,
splines=ortho,
concentrate=true,
overlap = true,
fontsize = 15]
node [shape=rect,
fontname = Helvetica,
color = '#0b41cd',
style = filled,
fillcolor = '#00a3e0',
fontsize = 11,
fontcolor='#FFFFFF']
rec1 [label = '@@1', width = 2, height = 0.5];
rec2 [label = '@@2', width = 2, height = 0.5];
rec3 [label = '@@3', width = 2, height = 0.5];
rec4 [label = '@@4', width = 2, height = 0.5];
rec5 [label = '@@5', width = 2, height = 0.5];
rec6 [label = '@@6', width=1];
rec7 [label = '@@7', width=1];
rec8 [label = '@@8', width=2];
rec9 [label = '@@9'];
rec10 [label = '@@10', width=2];
blank1 [label = '', color = '#000000', shape=point, width = 0, height = 0]
blank2 [label = '', color = '#000000', shape=point, width = 0, height = 0]
blank3 [label = '', color = '#000000', shape=point, width = 0, height = 0]
blank4 [label = '', color = '#000000', shape=point, width = 0, height = 0]
blank5 [label = '', color = '#000000', shape=point, width = 0, height = 0]
rec1 -> blank3[dir='none']
blank3 -> blank4 -> blank5 [dir='none']
blank1 -> blank2 -> blank3 [dir='none']
subgraph {
rank = same; blank1; blank2; blank3; blank4; blank5;
}
blank1 -> rec2
blank2 -> rec3
blank4 -> rec4
blank5 -> rec5
subgraph {
rank = same; rec2; rec3; rec4; rec5;
rec2 -> rec3 -> rec4 -> rec5 [style=invis]
}
rec4 -> rec6
rec4 -> rec7
subgraph {
rank = same; rec6; rec7;
rec6 -> rec7 [style=invis]
}
rec2 -> rec10
rec3 -> rec8
rec6 -> rec10
rec7 -> rec8
rec8 -> rec9
rec9 -> rec10 [style=invis]
subgraph {
rank = same; rec8; rec9; rec10;
}
}
[1]: 'A'
[2]: 'B'
[3]: 'C'
[4]: 'D'
[5]: 'E'
[6]: 'F'
[7]: 'G'
[8]: 'H'
[9]: 'I'
[10]: 'J'
")
Not sure why this is happening. Does anyone have any ideas?
I believe that concentrate is ignored when splines=ortho.
Maybe DiagrammeR can create your graph more easily, but here is a plain dot solution.
Giving: