Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Hierarchical Layout (Read 3977 times)
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Hierarchical Layout
Apr 13th, 2009 at 8:42am
Print Post  
Hi,

I have arranged some nodes in Hierarchical manner but it seems LeftToRight result instead of TopToBottom.Is their any arrangement pattern in Layout ? can i arrange node in Hierarchical Layout differently?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Hierarchical Layout
Reply #1 - Apr 13th, 2009 at 10:14am
Print Post  
What TreeLayout.Type are you using?
  
Back to top
 
IP Logged
 
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Re: Hierarchical Layout
Reply #2 - Apr 13th, 2009 at 11:47am
Print Post  
Hi,

I am using ArrangeLayout.
a simple snippet is here,

LayeredLayout layeredLayout = new LayeredLayout();
                       layeredLayout.LinkType = LayeredLayoutLinkType.Straight;
                       layeredLayout.Orientation = MindFusion.Diagramming.Wpf.Layout.Orientation.Horizontal;
                       layeredLayout.KeepGroupLayout = true;
                       layeredLayout.Arrange(diagram);


Thanks,
Anshul
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Hierarchical Layout
Reply #3 - Apr 13th, 2009 at 4:36pm
Print Post  
Well yes, this arranges consecutive layers from left to right:

layeredLayout.Orientation = MindFusion.Diagramming.Wpf.Layout.Orientation.Horizontal; 

Change it to Orientation.Vertical and layers will be arranged from top to bottom.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Re: Hierarchical Layout
Reply #4 - Apr 14th, 2009 at 4:59am
Print Post  
Hi Stoyan,

I have done this,its working but still I am not able to get that desired output.
In vertical orientation,I have got the same hierarchy but some nodes are not at their expected position.

Is their any other property by which arrangement pattern can differ?
plz let me know what is that "SegmentCount" and "RandomSeed" property does?

Thanks and Regards,
Anshul
  
Back to top
 
IP Logged
 
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Re: Hierarchical Layout
Reply #5 - Apr 17th, 2009 at 10:00am
Print Post  
Hi Stoyan ,
Plz reply for the problem discussed above as soon as possible.

Thanks in advance,
Anshul
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Hierarchical Layout
Reply #6 - Apr 17th, 2009 at 11:49am
Print Post  
LayeredLayout moves the nodes around to decrease the number of crossing links and make the links shorter. If you need a specific order of child nodes under some parent, check the code from this post:
http://mindfusion.eu/Forum/YaBB.pl?board=wpfdg_disc;action=display;num=121691895...

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Re: Hierarchical Layout
Reply #7 - Apr 18th, 2009 at 7:12am
Print Post  
Hi Stoyan,

Can you please tell me what is that "SegmentCount" and "RandomSeed" property does?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Hierarchical Layout
Reply #8 - Apr 18th, 2009 at 7:42am
Print Post  
RandomSeed is used in some force-directed layout algorithms to initialize their random number generator. SegmentCount is a property of DiagramLink that lets you change the number of links segments.

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