I've made some great progress in creating the chart we're after, however I'm coming across a situation where the routing between nodes seems to go haywire. This only happens rarely and mainly in very large charts (1000+ nodes) formatted as a tree layout.
The route seems to get confused, and what should take 2 or 3 segments, ends up looping around, or overlapping, nodes and taking 5-6 segments. I've attached screen shots.
My program flow is as such:
- Create and size all nodes. Node size is calculated manually, set, and then refined using "ResizeToFitText" maintaining node width.
- Next, all links are created. If the destination node is a leaf, then the link to the parent node is attached to an anchor in the bottom left corner of the parent. All other nodes are set to their default anchor (bottom middle).
- After that, I compact the nodes vertically and "stack" the leaf nodes. After the node is moved I call link.route.
- Finally, I create the TreeLayout with the following parameters:
TreeLayout layout = new TreeLayout();
layout.NodeDistance = 35f;
layout.LevelDistance = 35f;
layout.Anchoring = Anchoring.Keep;
layout.EnableAssistants = true;
layout.LinkStyle = TreeLayoutLinkType.Cascading3;
layout.Arrange(diagram1);
Code can be posted or emailed if needed.
Thank you!!