OptionalindexThe zero-based index into the links array. Internally generated when calling ForceLink.links(...)
OptionalrelationshipLink’s source node. For convenience, a link’s source and target properties may be initialized using numeric or string identifiers rather than object references; see link.id. When the link force is initialized (or re-initialized, as when the nodes or links change), any link.source or link.target property which is not an object is replaced by an object reference to the corresponding node with the given identifier. After initialization, the source property represents the source node object.
Link’s source link For convenience, a link’s source and target properties may be initialized using numeric or string identifiers rather than object references; see link.id. When the link force is initialized (or re-initialized, as when the nodes or links change), any link.source or link.target property which is not an object is replaced by an object reference to the corresponding node with the given identifier. After initialization, the target property represents the target node object.
A link between two simulation nodes. d3-force replaces the
sourceandtargetids with the node objects themselves on first tick, so read either through linkEndpointId.