I am trying to make a vertical oriented flow chart in graphviz dot. I'm new to this format so please go easy. My layout is 99% correct, but when I add a final edge (data -> h
) it breaks. I've noticed that if I add the final edge, but remove the "yes" label, the format is also correct. I've boiled this down to as simple of an example that still shows the undesired behavior.
My question:
How can I keep my desired vertical format, and keep the data -> h
edge, and keep the "yes" label.
Ideal, but missing final edge:
Broken, with final data -> h
edge:
Ideal, with final data -> h
edge, but with "yes" label removed:
digraph G {
a [
label = "a";
shape = diamond;
];
b [
label = "b";
shape = rect;
];
makedata [
label = "makedata";
shape = rect;
];
data [
label = "data";
shape = box3d;
]
filldata [
label = "filldata";
shape = rect;
]
num [
label = "num"
shape = box3d;
]
num2 [
label = "num2"
shape = box3d;
]
prepdata [
label="prepdata"
shape=rect;
]
prepdata2 [
label="prepdata2"
shape=rect;
]
lorem [
label="lorem_ipsum_dolor_sit"
shape="rect"
]
lorem2 [
label="lorem_ipsum_dolor_sit"
shape="rect"
]
h [
label="h"
shape="rect"
]
{
rank=same;
filldata;data
}
{
rank=same;
num2;prepdata2
}
// if data -> h is included, and this label is removed, formatting is also correct
a:s -> b [label="Yes"]
b -> makedata
makedata:e -> data:w
makedata -> filldata [weight=99]
filldata:e -> data:w
filldata->prepdata [weight=99]
data -> prepdata
data -> prepdata2
data -> lorem:ne
prepdata -> lorem:n [weight=99]
lorem -> prepdata2 [weight=99]
num:e->prepdata:w
num2:e->prepdata2:w [weight=99]
prepdata2:s -> lorem2:n [weight=99]
data -> lorem2
lorem2 -> h [weight=99]
// data -> h # the problem
}
Wrangling edges is sometimes a hit-or-miss proposition. Change your edge to terminate at h:ne (the northeast corner of h) like so:
data -> h:ne