Creating 45 degree connections

Hello!

Is it possible to override some methods or create extensions for drawing connectors such as orthogonal but including 45 degree directions? I can use polyline, but I want make this more comfy. For example, below I paint it to show what I want see.

Screenshot 2023-11-19 175956.jpg


6 Replies

KR Karkuvel Rajan Shanmugavel Syncfusion Team November 20, 2023 11:11 AM UTC

Hi Aksel Nielsen,


Requirement: How to create 45-degree connections


Diagonal direction connectors can be created by adding straight segments with specific points to the connector’s segments collection. Straight segments can be added/removed at any intermediate point of a connector and it can be edited to get desired angles.


Please refer following UG documentation link to learn more about straight-segment customization,


Straight segments of connectors | Syncfusion


We have attached the sample and video to demonstrate the behaviors.


Attachment: DiagonalSegments_82d3e684.zip


AN Aksel Nielsen November 20, 2023 12:38 PM UTC

Thanks for the responce. 

Yes, I know that I can use segments and manually create a 45 degree connection. But I mean something else.

For example,  when I try connect from ports in corners (top-left, top-right, etc), diagram programmatically permits creating only 45 degree connections. And corners between segments can be only 45 (or 135 ) degree too. I know that I can draw every connection with segments  in this style manually by myself, but I want that diagram does itself. 


Screenshot 2023-11-20 183605.png



DT Deepa Thiruppathy Syncfusion Team November 21, 2023 02:08 PM UTC

Hi Aksel Nielsen,


Requirement: How to create 45-degree connections programmatically


We are working on your requirement and update you more details on or before November 23,2023.


Regards,

Deepa Thiruppathy



DT Deepa Thiruppathy Syncfusion Team November 22, 2023 01:56 PM UTC

Hi Aksel Nielsen,


Requirement: How to programmatically create segments of connectors at a specific angle?


We have used our ObjectDrawn event to programmatically construct connector segments at a particular angle. We have prepared a simple sample to illustrate this. In the sample, we've included code that creates connector segments between two nodes on the same X-axis. You can use our implementation as a guide to develop your own codes for creating connector segments at specific angle to meet your specific needs. For your convenience, we've attached both the sample and a reference video.


Attachment: DiagonalSegmentModified_bd04437e.zip


AN Aksel Nielsen November 27, 2023 06:21 AM UTC

Hello, thank you for the responce and the suggested aproach!



PR Preethi Rajakandham Syncfusion Team November 27, 2023 11:27 AM UTC

Hi Aksel,

You're welcome. 

Please let us know if you need any further assistance. As always, we will be happy to assist you.

Regards,

Preethi R


Loader.
Up arrow icon