Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Circular layout (Read 2505 times)
BidMaestro
Junior Member
**
Offline


to learn is to live

Posts: 74
Location: Australia
Joined: Apr 20th, 2008
Circular layout
Feb 17th, 2009 at 2:42am
Print Post  
What a great new function: for those that have not used it, try the following code as part of your layout before you arrange the diagram

LayoutCircular.Radius = Diagram1.Nodes.Count * 8
LayoutCircular.SiftingRounds = 3

I found these values useful no matter how many nodes you have on the diagram. The Radius multiplier of 8 depends on the size of the shapes you are using; in my case, they are 25 * 25
Smiley
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Circular layout
Reply #1 - Feb 17th, 2009 at 8:33am
Print Post  
thanks for the hint - that 8 is close to 25 / PI, so people using a different node size could set Radius = Diagram.Nodes.Count * nodeSize / Math.PI, to put it on scientific basis 8)
« Last Edit: Feb 17th, 2009 at 1:05pm by Stoyo »  
Back to top
 
IP Logged
 
BidMaestro
Junior Member
**
Offline


to learn is to live

Posts: 74
Location: Australia
Joined: Apr 20th, 2008
Re: Circular layout
Reply #2 - Mar 3rd, 2009 at 6:47am
Print Post  
Stoyo

This question may be more of a suggested featured. When I create a circular layout how can I determine the coordinates where the central point of the circle is?

The reason being, is that I would like to produce two circular layouts, one within the other. This would also require passing the coordinates indicating the centre point for the circle

regards
Doug  Smiley
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Circular layout
Reply #3 - Mar 3rd, 2009 at 9:29am
Print Post  
Hi Doug,

Applying CircularLayout on a single sub-graph should set the circle center at (diagram.Bounds.Left + cl.Radius + cl.Margins.Width, diagram.Bounds.Top + cl.Radius + cl.Margins.Height). I suppose you could offset the second sub-graph by increasing the CircularLayout.Margins.

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


to learn is to live

Posts: 74
Location: Australia
Joined: Apr 20th, 2008
Re: Circular layout
Reply #4 - Mar 3rd, 2009 at 12:15pm
Print Post  
Stoyan

Thanks for the hint; I will have a play. What I was trying to achieve is a diagram (attached) and created manually (very badly). On the inner circle I have a group of companies in the outer circle I have all the Directors of those companies.

I am not sure if the file will attach to this forum reply; if not I will email it to you.[img][/img]

regards
Doug
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Circular layout
Reply #5 - Mar 3rd, 2009 at 2:42pm
Print Post  
Actually that looks more like a combination of CircularLayout and radial TreeLayout. You might try applying CircularLayout on the inner circle, attach the nodes from it to a single root node, and then running TreeLayout with KeepGroupLayout enabled. Let me know if that doesn't work - we could create some compound layout class based on the circular and raidal ones.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint