Edge element (Q.Edge) is the graph element connecting two nodes, showing the topological relation among points. It represents transmission pipe, routines or relation of things in actual application.

Create edge

Generally the following codes would be used for creating edges 

var edge = graph.createEdge(from, to, “edge name”);

The edge constructor may also be adopted 

var edge = new Q.Edge(from, to);
edge.name = “edge name”;