Page Index Toggle Pages: [1] 2 3  Send TopicPrint
Very Hot Topic (More than 25 Replies) Layered Layout direction (Read 28718 times)
choohj70
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 77
Joined: Sep 23rd, 2008
Layered Layout direction
Mar 2nd, 2009 at 10:15pm
Print Post  
Hello,

I am generating a complex network using Layered Layout functionality.

On some complex maps, the direction of the SOME arrows go from right to left rather than forcing all of them to go from left to right.

Is there a setting that can prevent this from happening?

Thank you,
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Layered Layout direction
Reply #1 - Mar 3rd, 2009 at 6:38am
Print Post  
Hi,

Links cannot go all in the same direction if there is a cycle in the graph. Is that complex network of yours an acyclic graph?

Stoyan
  
Back to top
 
IP Logged
 
choohj70
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 77
Joined: Sep 23rd, 2008
Re: Layered Layout direction
Reply #2 - Mar 3rd, 2009 at 6:45am
Print Post  
No. There is no cyclical relationship to the network at all.

Thank you,
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Layered Layout direction
Reply #3 - Mar 3rd, 2009 at 9:16am
Print Post  
Could you save the diagram as xml and email it to support@mindfusion.eu?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Layered Layout direction
Reply #4 - Mar 3rd, 2009 at 11:29am
Print Post  
So there are 5 links out of 137 going from right to left, is it that bad? Smiley LayeredLayout tries to meet more concerns than just the link direction - from the docs:

connected nodes must be placed close together;
links must flow in one direction if possible;
links must cross as few layers as possible;
links must not cross other links;

In your case it might have decided that those 5 links would lead to many crossings and too long other links if they went from left to right as well. I suppose we can add a property that would give priority to link direction, but that won't happen before the V3 release.

Stoyan
  
Back to top
 
IP Logged
 
choohj70
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 77
Joined: Sep 23rd, 2008
Re: Layered Layout direction
Reply #5 - Mar 3rd, 2009 at 3:31pm
Print Post  
Thank you. In my use, backward link is bad since it is time-based.

In the mean time, is there a way for me to create a vertical grid that represent a certain time period or sequence (i can generate that dynamically) and constrain left top corner to be in that grid while running layered layout so that the layout is based on time?

Thank you very much for your help.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Layered Layout direction
Reply #6 - Mar 3rd, 2009 at 7:11pm
Print Post  
Even if all links go from left to right, that would not guarantee LayeredLayout would place nodes that represent earlier time on the left of ones that represent later time. E.g. imagine two parallel chains of nodes - LayeredLayout would place in the same layer a node from the first chain together with a node from the second chain, even if they are very distant in time.

You could prevent this by creating a link between each pair of nodes to define their time dependency, but the result in LayeredLayout would be that each layer is occupied by just a single node, and the layout would occupy very large area.

We have some time-dependant layouts implemented in our Planner.NET scheduling component, but it would take some time to port them to NetDiagram.
« Last Edit: Mar 4th, 2009 at 6:10pm by Stoyo »  
Back to top
 
IP Logged
 
choohj70
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 77
Joined: Sep 23rd, 2008
Re: Layered Layout direction
Reply #7 - Mar 3rd, 2009 at 7:22pm
Print Post  
Thank you do much for working with me on this.

Can I group the nodes that are in same time period manually and use the keep group together feature to achieve this?

If so, can you please show me an example of how to create a group and add nodes to it?

Thank you.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Layered Layout direction
Reply #8 - Mar 4th, 2009 at 10:14am
Print Post  
I don't think that will work very well. If you wish to implement time-dependent layout yourself, the general idea is the following:

- subtract the start of your timeline from the time associated with each node to get a TimeSpan. Find the ratio of that timespan.Seconds to the length of the timeline length in seconds, and apply it to the diagram.Bounds.Width to get the X coordinate of the node.

- add the start and end times of nodes to a list, along with some markers whether it's a start or end time, and references to the associated nodes. You also need a variable to keep count of overlapping nodes. Sort that list and loop over it - for each start time, increment the overlap counter, and for each end time, decrement it. For each start time, associate the current value of the counter with the respective node, say using a hashtable. Now from these overlap counters, you will know for each node how many other nodes will share the same horizontal space, and you can set the Y coordinate of the nodes accordingly, e.g. by distributing them uniformly along diagram.Bounds.Height.

- to minimize link crossings, run a few sweeps over overlapping nodes, each time swapping the positions of a pair of nodes and count the resulting crossings. Leave the nodes at positions that result in fewer crossings.

If you need that urgently and wish our developer to implement it for you, we can do it for a fee:
http://www.mindfusion.eu/services.html

Otherwise, we can implement that as a built-in layout class after the version 3 release, for no additional cost to you.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
choohj70
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 77
Joined: Sep 23rd, 2008
Re: Layered Layout direction
Reply #9 - Mar 4th, 2009 at 4:49pm
Print Post  
Thank you for your recommendation. What do you think the timing on each option is? Also, what is the fee structure for option 1?

Do you have a release date determined for V3?

Also, do you have an example that shows how to use groups and lanes in NetDiagram that you can share?

Thank you.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Layered Layout direction
Reply #10 - Mar 4th, 2009 at 6:07pm
Print Post  
You could send a short specification to iva@mindfusion.eu and she will send you a quotation after our developers estimate how much work will be needed. We plan to release Netdiagram 3 by the end of this month if there aren't any major bugs found.

The built-in lane grid feature is available only in ImageMap mode at this time. You can see a more elaborate example showing how it works in the Windows Forms version of the control:
https://www.mindfusion.eu/FCNetDemo.zip

If using JavaApplet mode, you can create lanes using rectangular nodes: move them to the back of Z order and set them Locked = true, so users can't select and resize them.

To create a group, place the nodes in the positions you'd like them, and call their AttachTo method to attach them to the main node. To create groups similar to the ones in Visio, add a transparent node to serve as a container and attach the other nodes to it.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
choohj70
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 77
Joined: Sep 23rd, 2008
Re: Layered Layout direction
Reply #11 - Mar 19th, 2009 at 4:17pm
Print Post  
Hello,

Will there be or is there (I may have not found it) a property that would allow giving a priority to link direction in V3?

Thank you,

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Layered Layout direction
Reply #12 - Mar 19th, 2009 at 6:50pm
Print Post  
Hi,

We haven't implemented this yet. And now the latest JRE6 update breaks the applet (again), so we are in a hurry to release a patch. We'll probably have time for updating the layout class after that.

Stoyan
  
Back to top
 
IP Logged
 
choohj70
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 77
Joined: Sep 23rd, 2008
Re: Layered Layout direction
Reply #13 - May 12th, 2009 at 4:09pm
Print Post  
Stoyan,

We are getting more and more complaints from our users about this and I was wondering if there was any update to this item.

Thank you.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Layered Layout direction
Reply #14 - May 13th, 2009 at 2:05pm
Print Post  
Get an updated version of the control from the PM page. It adds the EnforceLinkFlow property to LayeredLayout, which you could enable to prevent links going against the flow.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 3 
Send TopicPrint