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

Connecting shapes to connectors

1 Answer 73 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Application
Top achievements
Rank 1
Application asked on 29 Aug 2017, 02:52 PM

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.

 

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 30 Aug 2017, 12:24 PM
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.
Tags
Diagram
Asked by
Application
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or