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

Diagram Connection

4 Answers 116 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Anthony
Top achievements
Rank 1
Anthony asked on 03 May 2013, 04:21 PM
Is it possible, and if so how, to replace the connection line.  For example, we would like to have a double line (instead of a single line).  We've tried changing the Stroke brush, but we did not have success when the orientation of the connection changed.  Thank you in advance.

4 Answers, 1 is accepted

Sort by
0
Miro Miroslavov
Telerik team
answered on 06 May 2013, 07:47 AM
Hello Anthony,

 In order to make the connection line more thick you can set the StrokeThickness that way:

<telerik:RadDiagramConnection EndPoint="100 100" StrokeThickness="2" />
There are plenty of other properties to control the visual representation of a Connection - look at the bottom here.
Hope this helps. 

Greetings,
Miro Miroslavov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Anthony
Top achievements
Rank 1
answered on 06 May 2013, 03:56 PM
I understand how to change the stroke thickness, but that was not my question. We would like to have a double line instead of a single line -- please see attached examples.
0
Accepted
Miro Miroslavov
Telerik team
answered on 07 May 2013, 11:38 AM
Hello Anthony,

 Can you can achieve this by creating Custom Connection. This is not very straight forward. You can examine my attached project. Please note that in this particular scenario you should take care of the angle between the line and the shape. Otherwise if the connection is vertical - the two lines will merge into one.
Hope this helps. Please let us know if we can be of further help. 

Kind regards,
Miro Miroslavov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Matt
Top achievements
Rank 1
answered on 17 May 2013, 09:24 AM
For anyone interested, the double lines can be separated without worrying about orientation using the following code:

var rotation = Math.Atan2(EndPoint.Y - StartPoint.Y, EndPoint.X - StartPoint.X);
rotation += Math.PI / 2;
var vOffset = new Point(Math.Cos(rotation) * 2.5, Math.Sin(rotation) * 2.5);

Cheers

M
Tags
Diagram
Asked by
Anthony
Top achievements
Rank 1
Answers by
Miro Miroslavov
Telerik team
Anthony
Top achievements
Rank 1
Matt
Top achievements
Rank 1
Share this question
or