Creates a new simulation with no nodes initially.
The simulator is not started. In addition,
A side-effect method which, given a list of nodes, computes the position of dangling nodes in the list if they are to be positioned in a circle pattern.
A list of nodes which contains all the dangling nodes, whose (x, y) coordinates are to be computed
The coordinates of the center of the circle
The radius of the circle
Given a list of relationships, this method filters out all "duplicate" relationships connecting the same pair of nodes.
For example, if the relationships are
[ { "source": "node1", "target": "node2" }, { "source": "node1", "target": "node2" }, { "source": "node5", "target": "node6" }, ]
then this method returns
[ { "source": "node1", "target": "node2" }, { "source": "node5", "target": "node6" }, ]
a sub-list of relationships, each of which connects a unique pair of nodes
the specified list of relationshiops to be filtered
Given a node distance and a number of nodes which are to be positioned on a circle equi-distance, this method returns a approximated radius of the circle.
The radius calculation is based on the assumption that the perimeter of the circle is approximately equal to (the number of links) x (the number of nodes residing on the circle). The perimeter is, therefore, 2 * PI * R, where R is to be returned by this method.
PERIMETER / (2 * PI)
the number of nodes residing on the calculated circle.
Positions un-located nodes of a graph onto a circle and restarts the simulation.
the graph whose dangling nodes are to be redrawn
Re-apply force to links of a graph.
the graph whose relationships are to be re-simulated
Generated using TypeDoc
ForceSimulation is a wrapper of d3-force Simulation.