Is it possible to add connector segments at runtime? I would like my connector to be Orthogonal instead of straight.
I
have tried the following but "Segments is not defined". Note, I have also tried just "segments: Orthogonal" and both as lowercase also.
<script>
function addReportNode() {
var diagram = $("#Diagram").ejDiagram("instance");
// Defines JSON to create a node
var reportNode = {
name: "reportNode",
offsetX: 550,
offsetY: 240,
height: 80,
width: 200,
fillColor: "rgb(75, 205, 150)",
type: ej.datavisualization.Diagram.Shapes.Html,
templateId: "htmlReportTemplate",
};
var connector = {
segments: Segments.Orthogonal,
sourceNode: "sourceNode",
targetNode: "reportNode"
}
// Adds node to the Diagram
diagram.add(reportNode);
diagram.add(connector);
}
</script>