Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic TableNode, links, and Layout (Read 4758 times)
TimNZ
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 23rd, 2009
TableNode, links, and Layout
Mar 15th, 2009 at 10:48am
Print Post  
Hi,

Just stated using FC.Net even though I've had a Pro licence for a few months.

My first tool is a database diagrammer that shows foreign key relationships between tables.

I'm trying to get the diagram to:
* Display tables fairly close.
* Right angled links only (cascading?)
* Prevent links from crossing each other (as much as possible)
* Have each link connect at a different anchor point on a node

I've tried everything, and read forums for ideas, but I'm struggling here.

Any tips? I've tried all the layouts, screenshots show Orthogonal and Circular which provide the 'best' results, the rest are useless.  I know I can a nice look with Circular by increasing the radius to 100f (default is 60), but how would I figure out the 'right' radius to use?





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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: TableNode, links, and Layout
Reply #1 - Mar 15th, 2009 at 11:25am
Print Post  
Hi,

Try this code:
http://mindfusion.eu/Forum/YaBB.pl?board=wpfdg_disc;action=display;num=123262812...

If that's not good enough, email to support@mindfusion.eu a sample diagram of yours, saved as xml, and our developer will try to find a better way to arrange it.

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


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 23rd, 2009
Re: TableNode, links, and Layout
Reply #2 - Mar 16th, 2009 at 7:44pm
Print Post  
Thanks Stoyo,

It makes a little difference, you may have run the Router a few times to get it right, and I need to re-do the Self links afterwards.  Strangley sometimes links end up looking their Head connection to the other node and are left dangling in the middle of the diagram.

I'll post the diagram to support.  Given the multiple links each node can have I know it could be very difficult to get right automatically.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: TableNode, links, and Layout
Reply #3 - Mar 17th, 2009 at 9:04am
Print Post  
Hi Tim,

I've checked the support inbox, we haven't received this yet.

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


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 23rd, 2009
Re: TableNode, links, and Layout
Reply #4 - Jun 27th, 2009 at 1:59am
Print Post  
Hi Stoyan,

Took my time but just sent an email with screenshots and VS2008 project.

Using FC 5.3.0

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: TableNode, links, and Layout
Reply #5 - Jun 27th, 2009 at 7:39pm
Print Post  
Hi Tim,

Quote:
The first screenshot is an example of what I can achieve with FC, the following screenshots are the nice layout achieved in Crystal Reports


Well now, that's not exactly a fair comparison. The Crystal Reports image shows a simple tree, and if you used the same schema in your application, you could get a similar layout using TreeLayout. Your graphs are much denser, so TreeLayout won't work with them. Try a combination of LayeredLayout and link routing as shown below.

Code
Select All
LayeredLayout layout = new LayeredLayout();
layout.Orientation = MindFusion.Diagramming.Layout.Orientation.Horizontal;
layout.IgnoreNodeSize = false;
layout.EnforceLinkFlow = true;
layout.Arrange(diagram);

foreach (DiagramLink link in diagram.Links)
	link.SegmentCount = 1;
diagram.RouteAllLinks();
 



You haven't sent us the diagram file, so I've drawn something similar to your screenshot in my test app, and the code above arranged it like this:



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


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 23rd, 2009
Re: TableNode, links, and Layout
Reply #6 - Jun 28th, 2009 at 7:38am
Print Post  
Thanks for the very quick response Stoyan.

I wasn't using Tree, I was using Orthagonal, but it's fair to say the node structure is a lot more complicated with mine.

It's quite likely I'll change the app to navigate through the schema visually differently, and use TreeViewNode.  Or maybe both.

There doesn't seem to be a Font property for TreeViewItem.

Will keep on playing.

Kind regards,
Tim
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: TableNode, links, and Layout
Reply #7 - Jun 28th, 2009 at 9:30am
Print Post  
Yes, I mentioned TreeLayout only because the Crystal Reports example was a tree. Anyway I like the result above, or are your graphs even more complex than this? I don't think you can arrange it in a much better way even by hand - if you can, send us a screenshot showing how you'd like it to look and we might think of something...

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


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 23rd, 2009
Re: TableNode, links, and Layout
Reply #8 - Jun 28th, 2009 at 10:48am
Print Post  
How about this? I believe it is impossible to get this particular structure to not cross..

What I would like to achieve is the minimum number of crossings. Links can connect to any point of the node, they are not linked to particular cells/rows.

Links that are parallel and very close to each other are also hard to follow, so a way of indicating minimum gaps perhaps..





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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: TableNode, links, and Layout
Reply #9 - Jun 28th, 2009 at 10:56am
Print Post  
If you need to show the actual relations between table rows, I think the LayeredLayout code above will get you the most legible results. From that last image I reckon you don't need to show the row relations?
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint