Hi,
I’m a newbie working with GoJS on a prototype that uses a LayeredDigraphLayout with bands and I have some nodes that are grouped and some nodes that are not. I’m have trouble getting things to layout in a way where the node links don’t overlap and are as straight as possible.
The following forum post seems related to my issue which gave me the idea of setting Group.layout = null on my group template.
That seemed to fix my overlapping lines issue and also resulted in straighter lines. But my group always shows up in the 1st band and not in the 2nd band (see screenshots below).
Node & Link Data
nodeData = [
{ key: 1, type: “task”, id: “task1”, name: “Landing Page”, channel: “web”, count: 3 },
{ key: 2, type: “split”, id: “2”, name: “Response Split”, count: 3, isGroup: true },
{ key: 3, type: “cell”, id: “3”, name: “Accepted”, count: 2, group: 2 },
{ key: 4, type: “cell”, id: “4”, name: “Did Not Accept”, count: 1, group: 2 },
{ key: 5, type: “cell”, id: “5”, name: “Remainder”, count: 0, group: 2 },
{ key: 6, type: “cell”, id: “6”, name: “Missing”, group: 2 },
{ key: 7, type: “task”, id: “task3”, name: “Followup Email”, channel: “email” },
{ key: 8, type: “task”, id: “task2”, name: “Welcome Email”, channel: “email”, count: 2 },
{ key: 9, type: “wait”, id: “9”, name: “Wait 5 Days”, count: 1 },
{ key: 10, type: “stop”, id: “10”, name: “Stop” },
];
linkData = [
{ from: 1, to: 2 },
{ from: 5, to: 12 },
{ from: 3, to: 8 },
{ from: 4, to: 9 },
{ from: 8, to: 10 },
{ from: 9, to: 7 },
{ from: 7, to: 10 },
{ from: 6, to: 7 },
{ from: 5, to: 10 },
];
Group.layout = $(go.GridLayout, { wrappingColumn: 1 })
Puts the “Response Split” group in the correct band but doesn’t re-order the grouped nodes to avoid overlapping lines nor does it position the group optimally to result in straighter lines.
Group.layout=null
Fixes my overlapping links and also positions the “Response Split” group, the grouped nodes and downstream nodes so that lines are straight. But it always puts the group in the 1st band.
How can I get the best of both of the above screenshots? I need my group in the 2nd band like the 1st screenshot but the layout of the group and downstream nodes like the 2nd screenshot.
Kendal