Connecting shapes to connectors

2 posts, 0 answers
  1. Application
    Application avatar
    5 posts
    Member since:
    Dec 2013

    Posted 29 Aug 2017 Link to this post

    Is there a way to connect shapes to connectors, rather than simply shapes to shapes? I have a requirement that needs a shape to connect to the mid-point of a connector between two shapes. I've tried a work around having 2 connectors from the same point on one shape without any success.

    Attached is a rough idea of what I want to do, so want to connect the vertical line from the horizontal connector to the bottom shape.

    Any suggestions gratefully received! Thanks.

     

  2. Vessy
    Admin
    Vessy avatar
    2093 posts

    Posted 30 Aug 2017 Link to this post

    Hi,

    Yes. it is possible. In order to do so, you simply ned to specify the from and to connectors for the connection in a similar way:
    <telerik:RadDiagram ID="ModelReport" runat="server">
        <LayoutSettings Enabled="true" Type="Tree" Subtype="Up">
        </LayoutSettings>
        <ShapesCollection>
            <telerik:DiagramShape Id="s1"></telerik:DiagramShape>
            <telerik:DiagramShape Id="s2"></telerik:DiagramShape>
            <telerik:DiagramShape Id="s3"></telerik:DiagramShape>
        </ShapesCollection>
        <ConnectionsCollection>
            <telerik:DiagramConnection>
                <FromSettings ShapeId="s1" Connector="top" />
                <ToSettings ShapeId="s2" Connector="right" />
            </telerik:DiagramConnection>
            <telerik:DiagramConnection>
                <FromSettings ShapeId="s1" Connector="top" />
                <ToSettings ShapeId="s3" Connector="left" />
            </telerik:DiagramConnection>
        </ConnectionsCollection>
    </telerik:RadDiagram>


    More details on the predefined connectors you can use can be found here:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/diagram/structure/connector#connectorscollection


    Regards,
    Vessy
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top