Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Problem with Hierarchical layout and bending Link (Read 2858 times)
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Problem with Hierarchical layout and bending Link
Nov 19th, 2009 at 5:48am
Print Post  
Hi Stoyan,

We are using following code for arranging Hierarchical layout.

LayeredLayout layeredLayout = new LayeredLayout();
                       //layeredLayout.LinkType = LayeredLayoutLinkType.Cascading;
                       //layeredLayout.Orientation = MindFusion.Diagramming.Wpf.Layout.Orientation.;
                       layeredLayout.KeepGroupLayout = true;
                       layeredLayout.LayoutNode = LayoutNodeHandler;
                       layeredLayout.Direction = Direction.Straight;
                       layeredLayout.Arrange(diagram);

                       //To reset link's SegmentCount and Style.
                       foreach (DiagramLink link in diagram.Links)
                       {
                           link.SegmentCount = 1;
                           link.Style = LinkStyle.Polyline;
                       }


There are two scenarios in the arraged hierarchical layout.

1.When we use foreach loop we get overlapped links.
2.When we don't use foreachloop we get bending links.

We don't want both.
Is there anyother way to do this?

Please suggest for this .


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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problem with Hierarchical layout and bending L
Reply #1 - Nov 19th, 2009 at 8:27am
Print Post  
Try enabling the StraightenLongLinks property of LayeredLayout. You should get at most two bends per link with it.
  
Back to top
 
IP Logged
 
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Re: Problem with Hierarchical layout and bending L
Reply #2 - Nov 19th, 2009 at 1:26pm
Print Post  
Hi Stoyan,

I don't want two bends per link. Is it possible to have straigth link with any band or overlapping ?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problem with Hierarchical layout and bending L
Reply #3 - Nov 19th, 2009 at 1:38pm
Print Post  
I think only CircularLayout can do that for arbitrary graphs. You might also try using StraightenLongLinks with LayeredLayout and then set the links' SegmentCount to 1. That might still decrease the chance for links to overlap with nodes.
  
Back to top
 
IP Logged
 
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Re: Problem with Hierarchical layout and bending L
Reply #4 - Nov 19th, 2009 at 4:14pm
Print Post  
Hi Stoyan,

Can you please provide some code snippet to perform Hierarichical operation using CircularLayout?
As I don't have any idea of CircularLayout, your initial help will guide me to make further modification.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problem with Hierarchical layout and bending L
Reply #5 - Nov 20th, 2009 at 2:55pm
Print Post  
CircularLayout does nothing to display hierarchical relations. It just lets you display the graph using only single-segment links without any link-node overlaps. Sorry but you can’t have it all; either use TreeLayout and LayeredLayout to display hierarchies, or CircularLayout to display the connections using only single-segment lines.

Stoyan
  
Back to top
 
IP Logged
 
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Re: Problem with Hierarchical layout and bending L
Reply #6 - Nov 21st, 2009 at 7:26am
Print Post  
Thanks Stoyan, Thanks for the information.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint