Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Drawing a decision tree - how to force nodes to always be on left or right? (Read 1739 times)
Octothope
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 1
Joined: Aug 25th, 2015
Drawing a decision tree - how to force nodes to always be on left or right?
Aug 25th, 2015 at 3:21pm
Print Post  
I am using the diagram control to draw a Yes/No decision tree, where every intermediary node has at most two paths. I want a child node for the "yes" path to always be drawn to the left of it's sibling, the "no" path.

How can I do this?

I tried adding the yes nodes to the Nodes collection using Insert and an index of 0 to place them at the front of the collection, before any of the No nodes, but the diagram doesn't seem to draw in the order of the collection.

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Drawing a decision tree - how to force nodes to always be on left or right?
Reply #1 - Aug 25th, 2015 at 5:05pm
Print Post  
If using TreeLayout, the order of node's children should depend on order of links in node.OutgoingLinks collection. Try swapping the links if they are in wrong order or calling the node.OutgoingLinks.Sort() method.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint