This is a migrated thread and some comments may be shown as answers.

Diagram Layout & Routing

2 Answers 114 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Hamed
Top achievements
Rank 2
Hamed asked on 10 Jul 2014, 10:12 AM
I Have an Organization chart which i want to look exactly like the file I've attached (this is telerik's doc figure).

What I see is a route started from bottom of parent shape to top of child shape as I've marked with TipOverTree.

What I Want is a route Started from bottom of parent to Left of child, as i marked with What I WANT.

Could anyone help me?
Thank you

2 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 11 Jul 2014, 06:55 AM
Hello Hamed,

There are several thing you need to ensure when you set up TipOverTree Router and Layout. Please check out the attached project in which there is an isolated TipOverTree solution. The key moments are:
  • Configure connectors for TipOverTree - check functions PopulateConnectorCollection() and EnsureConenctors()
  • Configure both layout and routing - check PrepareAndLayout() method
  • improve performance by skipping some of the connection updates: 
    his.diagram.Connections.ForEach(x => RadDiagramConnection.SetIsAutoUpdateSuppressed((RadDiagramConnection)x, true));
                this.diagram.Layout(LayoutType.Tree, settings);
                this.diagram.Connections.ForEach(x => RadDiagramConnection.SetIsAutoUpdateSuppressed((RadDiagramConnection)x, false));
                this.diagram.Connections.ForEach(x => x.Update());
            }

We hope this helps.

Regards,
Petar Mladenov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Petar Mladenov
Telerik team
answered on 11 Jul 2014, 07:41 AM
Hello Hamed,

I am attaching second solution which uses AStarRouter instead of the OrgTreeRouter. We believe AStarRouter is easier to setup. After Layout we invoke a small function which configures to which connectors the connections should attach. However, please have in mid that the connections will not be so straight (with little connection points , corners) with this kind of router.

Regards,
Petar Mladenov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
Diagram
Asked by
Hamed
Top achievements
Rank 2
Answers by
Petar Mladenov
Telerik team
Share this question
or