How to draw orthogonal line connection

4 posts, 0 answers
  1. Hyunho
    Hyunho avatar
    23 posts
    Member since:
    Feb 2013

    Posted 03 May 2013 Link to this post

    Dear sir,

    I was wondering how to draw orthogonal line connection on a diagram like visio.
    RadDiagram provide three types of connection( polyline, beizer, spline.), but I couldn't find a way to draw orthogonal line.
    I have looked over Routing service in the manual, but I couldn't understand it.

    I need this function because my application is similar to MS visio.

    Could you show me a example for this?

    Thank you.
  2. Petar Mladenov
    Petar Mladenov avatar
    2991 posts

    Posted 06 May 2013 Link to this post

    Hello Hyunho,

    You can start with our Connections help article
    here. Basically , to make a real Polyline connection , you can add points to the ConnectionPoints collection of the RadDiagramConnection - either programmatically, or interactively by pressing (Ctrl + Mouse Left Button) over the connection. Then you can move this intermediate points to control your connection.

    In order to use the built-in "orthogonal" routing mechanism in RadDiagram , just set the RouteConnections property to True. In the Routing section in our documentation you will find how to create and use custom routing algorithms, or how to use the OrgTreeRouter suitable for hierarchical diagrams.

    All the best,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. Subramaniam
    Subramaniam avatar
    7 posts
    Member since:
    May 2014

    Posted 21 Jan 2015 in reply to Petar Mladenov Link to this post

    Hi Petar,

    Actaully i am using raddiagram and raddiagram for the graphical representation of Server networks, So i have attached the image,
    In that connections i have been highlighted the issue from Red color out line, and mine requirement from green color, in image you can see, the blue connection line have so much turn, while if you see it should be like green lines connections, Please let me know how can i avoid these many turns from Polyline tyle Connections style, please provide me a sample...
    I used the route connection...


  4. Petar Mladenov
    Petar Mladenov avatar
    2991 posts

    Posted 23 Jan 2015 Link to this post

    Hi Subramaniam,

    You can try the AStarRouter in RadDiagram. We answered this queston in this forum thread.
    this.diagram.RoutingService.Router = new AStarRouter(this.diagram) { WallOptimization = true };
    this.diagram.RoutingService.FreeRouter = new AStarRouter(this.diagram) { WallOptimization = true };

    Petar Mladenov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top