Diagram Layout & Routing

3 posts, 0 answers
  1. Hamed
    Hamed avatar
    4 posts
    Member since:
    Aug 2013

    Posted 10 Jul 2014 Link to this post

    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. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 11 Jul 2014 Link to this post

    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.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 11 Jul 2014 Link to this post

    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.
     
Back to Top