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

How to draw orthogonal line connection

3 Answers 227 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Hyunho
Top achievements
Rank 1
Hyunho asked on 03 May 2013, 12:29 PM
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.

3 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 06 May 2013, 08:37 AM
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.

0
Subramaniam
Top achievements
Rank 1
answered on 21 Jan 2015, 02:07 PM
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...



Regards,

Subramaniyam
0
Petar Mladenov
Telerik team
answered on 23 Jan 2015, 02:39 PM
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 };


Regards,
Petar Mladenov
Telerik
 

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.

 
Tags
Diagram
Asked by
Hyunho
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Subramaniam
Top achievements
Rank 1
Share this question
or