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

Connect to upper port of target

Hello,

I have a Top-to-Bottom digram and I'm trying to connect a node to another node, making the connector starting from the bottom side of the source and ending in the top side of the target, the result will be a "loop".

Is this possible to achieve?

This is my diagram layout manager:

public LayoutManager LayoutManager { get; set; } = new LayoutManager()
        {
            Layout = new DirectedTreeLayout()
            {
                Type = LayoutType.Hierarchical,
                Orientation = TreeOrientation.TopToBottom,
                AvoidSegmentOverlapping = true,
                HorizontalSpacing = 150,
                VerticalSpacing = 50
            },
            RefreshFrequency = RefreshFrequency.ArrangeParsing
        };

Thank you

3 Replies

KR Karkuvel Rajan Shanmugavel Syncfusion Team January 2, 2020 04:09 AM UTC

Hi Fabrizio, 
 
Thanks for contacting Syncfusion support. 
 
Requirement : Need to create a diagram with nodes and connectors in loop like structure. 
 
In SfDiagram the default behavior is the same as your requirement that the connection will be made from the bottom of source node to the top of the target node for the “TopToBottom” Layout. But the statement “the result will be loop” is not clear for us. Please elaborate your requirement with any images or videos that will help us to provide appropriate solution.  
 
Please find more details about layouts and data source in below link. 
 
 
 
Regards, 
Karkuvel Rajan S 



FA Fabrizio Alessandro January 2, 2020 02:27 PM UTC

Hello,

Thanks for your reply, I'm attaching an image of the result I would like to get, I hope it is clearer.
In the picture the green line is the connector that I'm not able to create.

The diagram DataSource is a collection of items which have an Id and a list of ParentIds.

Thank you



Attachment: Diagram_52fb5aa3.zip


KR Karkuvel Rajan Shanmugavel Syncfusion Team January 3, 2020 05:32 AM UTC

Hi Fabrizio, 
 
Requirement : Need to create a diagram with nodes and connectors in loop like structure. 
 
As per the provided screenshot we suspect that you have try to create a flowchart with nodes and connectors. SfDiagram has the support to create flowchart with nodes and connectors. In flowchart we have support for decision  symbol which denotes the question that can be answered in binary format (Yes/No, True/False). The output direction of the decision symbol can be controlled by the direction of “Yes” and “No” branches using the YesBranchDirection and NoBranchDirection properties of Flowchart Layout class. As per our behavior, the connector can start from either left or right side of the source node and connected to left or right side of the target node. 
 
Please find more details about flowchart layout and it’s data source settings in below link. 
 
 
 
Please find the demo sample for your requirement in below link. 
 
 
Regards, 
Karkuvel Rajan S 


Loader.
Live Chat Icon For mobile
Up arrow icon