Create Constraint and Connection
These operations specify spatial constraints between elements or connect related marks.
msc.affix(elem, base, channel, params)
Affixes an element to a base element along a channel.
If both elem and base have been joined with data (i.e., each has multiple peers), they must have the same number of peers so that each elem peer can be affixed to a corresponding base peer.
elem: Markbase: Markchannel:"x","y","angle", or"radialDistance"params(Object, optional):- Return type:
void
msc.align(elems, channel, anchor)
Aligns multiple elements so they share the same position for a channel and anchor.
elems(Array): elements to alignchannel: usually"x"or"y"anchor: anchor used for alignment- Return type:
void
msc.connect(nodeMarks, linkMarks)
Connects node marks and link marks so each link mark references its source and target node marks.