Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) How to create layout dynamicly (Web) (Read 7233 times)
dbapnxf
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Joined: Jan 16th, 2006
How to create layout dynamicly (Web)
Jan 16th, 2006 at 6:30pm
Print Post  
I created my boxes but they will not lay out like I would like.  I tried this code but id does not work.
     LayeredLayout ll = new LayeredLayout();
     ll.SplitLayers = true;
     ll.LayerDistance = 50;
     ll.NodeDistance = 60;
     ll.Orientation =
          MindFusion.WebChart.LayoutSystem.Orientation.Vertical;
     ll.Arrange(fc);

Any and all help would be greatly appreciated.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to create layout dynamicly (Web)
Reply #1 - Jan 16th, 2006 at 6:46pm
Print Post  
Hi,

Doesn't that code move the nodes at all, or it moves them to wrong positions ?

Stoyan
  
Back to top
 
IP Logged
 
dbapnxf
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Joined: Jan 16th, 2006
Re: How to create layout dynamicly (Web)
Reply #2 - Jan 16th, 2006 at 6:50pm
Print Post  
I set it to horizontal the first tim and they where ok but I want vertical and I changed it but the nodes stay in the horizontal layout.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to create layout dynamicly (Web)
Reply #3 - Jan 16th, 2006 at 7:02pm
Print Post  
Are all nodes in the same graph? If the diagram has several graphs, the nodes in each graph will be laid out using vertical layout, but the graphs themselves are just stringed in a single row.
  
Back to top
 
IP Logged
 
dbapnxf
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Joined: Jan 16th, 2006
Re: How to create layout dynamicly (Web)
Reply #4 - Jan 16th, 2006 at 7:42pm
Print Post  
Not that I know of.  If I send you the code do you think you could help me?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to create layout dynamicly (Web)
Reply #5 - Jan 17th, 2006 at 5:43am
Print Post  
Hi,

Please send me the diagram data too - use SaveToFile or XmlWriter and email me the saved diagram.

Thanks
  
Back to top
 
IP Logged
 
dbapnxf
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Joined: Jan 16th, 2006
Re: How to create layout dynamicly (Web)
Reply #6 - Jan 17th, 2006 at 5:46pm
Print Post  
I appreciate all your help, thanks again
  
Back to top
 
IP Logged
 
dbapnxf
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Joined: Jan 16th, 2006
Re: How to create layout dynamicly (Web)
Reply #7 - Jan 18th, 2006 at 3:51pm
Print Post  
Now that I centered all nodes(boxes) the arrows are not in the center and I can not figure how to change them.  I emailed you the JPG to show you what I mean.  Thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to create layout dynamicly (Web)
Reply #8 - Jan 18th, 2006 at 5:39pm
Print Post  
Hi,

Assign to all boxes an AnchorPattern object that allows one incoming arrow at position (50, 0) and one outgoing arrow at (50, 100). Then the arrows will always go out from / come into exactly the centers of node top and bottom sides.

Another possibility is to explicitly set the positions of arrow.ControlPoints[0] and arrow.ControlPoints[arrow.ControlPoints.Count - 1]. After doing that call arrow.UpdateFromPoints so the arrowhead direction is recalculated.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
dbapnxf
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Joined: Jan 16th, 2006
Re: How to create layout dynamicly (Web)
Reply #9 - Jan 18th, 2006 at 7:16pm
Print Post  
The following code is how I tried to implement your sugestion but it did not change anything.  What am I doing wrong?

public class ScheduleDisplay : System.Web.UI.Page
{    
     .
     .
     .
     private AnchorPattern ap = new AnchorPattern(new AnchorPoint[]{
new AnchorPoint(50, 0, true, false),
new AnchorPoint(50, 100, false, true)});
     .
     .
     .
     public void buildStartTerm(DataSet dsSchedule)
         {
.
.
.
Box boxStart = fc.CreateBox(0, 0, 100, 50);
boxStart.AnchorPattern = ap;
.
.
.
fc.FitDocToObjects(10);
         }

.
.
.
public void buildBox(DataSet dsSchedule, int i)
{
Box bx = fc.CreateBox(0,0,200,100);
bx.AnchorPattern = ap;
.
.
.
}

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to create layout dynamicly (Web)
Reply #10 - Jan 18th, 2006 at 7:30pm
Print Post  
Try setting the layout's Anchoring property to 'Reassign'. The default value is 'Ignore', which makes the layout not use anchor points at all.
  
Back to top
 
IP Logged
 
dbapnxf
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Joined: Jan 16th, 2006
Re: How to create layout dynamicly (Web)
Reply #11 - Jan 18th, 2006 at 9:19pm
Print Post  
Thank you again.  That did it!!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint