LayoutManager problem

Hi.

Are there options in WebDiagramControl similar to options in Silverlight DiagramControl, to set vertical spacing, horizontal spacing and space between subtrees:

//Tree spacing properties
diagramModel.VerticalSpacing = 55;
diagramModel.HorizontalSpacing = 10;
diagramModel.SpaceBetweenSubTrees = 10;

These options are necessary for me, because I'm trying to draw organizational diagram

Cheers,
Peter.


1 Reply

AA Amsath Ali M Syncfusion Team April 24, 2012 08:42 PM UTC

Hi Peter,

Thanks for using Syncfusion products.

Yes the DiagramWebControl contains to set VerticalSpacing and horizontal spacing between nodes in the layout managers but there is no option to set space between trees. Please refer the below code snippet to set vertical and horizontal spacing between nodes.

Here is the code:
[C#]
//OrgChartLayout Manager
General
public OrgChartLayoutManager(Model model, float fRotation, float fHorizontalOffset, float fVerticalOffset);

public OrgChartLayoutManager(Model model, RotateDirection direction, float fHorizontalOffset, float fVerticalOffset, LayoutType layoutType, int nTreeLevel);


Code:
OrgChartLayoutManager dtLayoutMgr = new OrgChartLayoutManager(this.DiagramWebControl1.Model, RotateDirection.TopToBottom, 20, 50,LayoutType.Waterfall, 1, true);
this.DiagramWebControl1.LayoutManager = this.dtLayoutMgr;
this.dtLayoutMgr.UpdateLayout(null);

For more information, please visit our below online UG documentation link:
http://help.syncfusion.com/UG/User%20Interface/Windows%20Forms/Diagram/documents/43layoutmanagement.htm

Please let us know if you have any queries.

Regards,
Amsath Ali. M





Loader.
Up arrow icon