Add Nodes to a Diagram Using Ajax

Is it possible to add nodes to a diagram using Ajax?

1 Reply 1 reply marked as answer

AR Aravind Ravi Syncfusion Team September 21, 2020 07:34 AM UTC

Hi Dsoftware, 
 
By using the diagram public API method add we can able to add nodes in diagram at run time. In the Ajax service, get the diagram instance and through diagram instance add the nodes in the diagram. Please refer below code snippet 
 
 
   var diagram = $("#diagram").ejDiagram("instance"); 
 
    // Adds node to the Diagram 
    diagram.add(node); 
 
For more information about how to add nodes at run time, please refer to below UG documentation link 
 
 
Regards 
Aravind Ravi 


Marked as answer
Loader.
Up arrow icon