We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Avoid Connection Overlapping

Hello,

I'm working on a diagram, but when two or more nodes target the same node, the link overlap.

How can I fix this?


6 Replies

BM Bala Murugan A.S Syncfusion Team November 24, 2010 10:00 AM UTC

Hi Edward,

Thanks for using Syncfusion Products.

You can achieve your requirement by enabling the diagram’s Line Routing and Line Bridging. Please refer our online user guide documents from the below link.

http://help.syncfusion.com/ug_84/User%20Interface/Windows%20Forms/Diagram/default.htm?turl=Documents%2Flinerouting.htm

http://help.syncfusion.com/ug_84/User%20Interface/Windows%20Forms/Diagram/default.htm?turl=Documents%2Flinebridging.htm

Please let me know if you have any conerns.

Regards,
Bala Murugan A.S



ED Edward November 25, 2010 08:01 PM UTC

Hi, on simple diagrams it works, but in complex still happens



overlap_cfb38cf8.zip


BM Bala Murugan A.S Syncfusion Team December 1, 2010 11:27 AM UTC

Hi Edward,

Thanks for the update.

We suspect the reported issue to be a defect and have forwarded this to our Development Team for further analysis. We will update you with our Development Team’s response in one business day (December 2,2010).

Please let me know if you have any concerns.

Regards,
Bala Murugan A.S



BM Bala Murugan A.S Syncfusion Team December 3, 2010 01:50 PM UTC

Hi Edward,

We regret for the delay in responding. We are currently working on this with high priority, we will be updating you with more details on Monday(December 6,2010).

Thank you for your patience.

Regards,
Bala Murugan A.S



BM Bala Murugan A.S Syncfusion Team December 6, 2010 01:47 PM UTC

Hi Edward,

Thanks for your patience.

For your requirement, we suggest you to use different port for the node to prevent from link overlapping.Please refer the code snippet below to achieve this,

[C#]
//Rectangle Node 1
rect1 = new Syncfusion.Windows.Forms.Diagram.Rectangle(100, 400, 100, 40);

//Rectangle Node 2
rect2 = new Syncfusion.Windows.Forms.Diagram.Rectangle(300, 100, 100, 40);

//Rectangle Node 3
rect3 = new Syncfusion.Windows.Forms.Diagram.Rectangle(200, 200, 100, 40);



Syncfusion.Windows.Forms.Diagram.OrthogonalConnector connector = new OrthogonalConnector( new System.Drawing.PointF(50, 50), new System.Drawing.PointF(50, 50));
Syncfusion.Windows.Forms.Diagram.OrthogonalConnector connector1 = new OrthogonalConnector(new System.Drawing.PointF(50, 50), new System.Drawing.PointF(50, 50));

rect1.EnableCentralPort = false;

//creating Custom port for the node
Syncfusion.Windows.Forms.Diagram.ConnectionPoint cp = new Syncfusion.Windows.Forms.Diagram.ConnectionPoint();
Syncfusion.Windows.Forms.Diagram.ConnectionPoint cp1 = new Syncfusion.Windows.Forms.Diagram.ConnectionPoint();
rect1.Ports.Add(cp);
rect1.Ports.Add(cp1);
rect1.Ports[0].OffsetX = 10;
rect1.Ports[1].OffsetX = 50;

rect1.Ports[0].TryConnect(connector.TailEndPoint);
rect2.CentralPort.TryConnect(connector.HeadEndPoint);
rect1.Ports[1].TryConnect(connector1.TailEndPoint);
rect3.CentralPort.TryConnect(connector1.HeadEndPoint);

We have created a simple sample to demonstrate this and the same can be downloaded from the below link,

LineOverlapping-1232221215.zip

Please try the above sample and let me know if this is your actual requirements.


Regards,
Bala Murugan A.S



ED Edward December 9, 2010 10:33 PM UTC

Hi, Thanks it works as I expected


Loader.
Live Chat Icon For mobile
Up arrow icon