Hyperlink Connector Labels

Is it possible to create a label for a connector that is a hyperlink?

Right now I'm creating a connector at runtime with a text label but would like it to be a hyperlink:

<script>
function addConnector() {
            var diagram = $("#Diagram").ejDiagram("instance");

            var connector = {
                labels: [{ text: "Label" }],
                sourceNode: "continueNode",
                targetNode: "processNode"
            }

            diagram.add(connector);
        }
</script>

Attachment: hyperlinkConnectorLabelRequest_808e233a.zip

1 Reply 1 reply marked as answer

AR Aravind Ravi Syncfusion Team July 24, 2020 11:37 AM UTC

Hi Dsoftware, 
 
By using the label’s hyperText property we can able to add hyperlink to the label. In the hyperText property set the page link where you want to navigate when click on the label and set text for the hyperlink. Please refer below example for how to set hyperlink for connector. 
 
var connectors = 
        // Defines JSON 
        { 
            //Name of the connector 
            name: "newConnector", 
            //Sets source and target points 
            sourcePoint: { 
                x: 700, 
                y: 100 
            }, 
            targetPoint: { 
                x: 900, 
                y: 250 
            }, 
           labels: [{ 
                        "text": "Syncfusion", 
                        "hyperlink": "https://www.syncfusion.com/", 
                        fontColor: "blue", 
                        bold: true, 
                        textDecoration: ej.datavisualization.Diagram.TextDecorations.Underline 
                    }], 
                         
        }; 
 
 
 
Regards 
Aravind Ravi 


Marked as answer
Loader.
Up arrow icon