HierarchicalLayout
A layout that places vertices into a series of layers. This layout expects no cycles, and does not deal well with cycles. You can use the Hierarchy layout if your dataset has cycles. We originally intended to leave this layout out of VisuallyJs, because you can use the HierarchyLayout but for some basic use cases this layout is still helpful.
Extends
Methods
getAbsolutePosition()
getAbsolutePosition(
v,parameters?):PointXY
Gets the position for the given Node/Group as dictated by either the left/top properties, or some other nominated pair, in the Node/Group's data. This position is what the Absolute layout uses itself, and this method exposes the absolute position for subclasses that wish to make use of the absolute backing.
Parameters
v
Node/Group to get absolute position for.
parameters?
Constructor parameters. May contain a custom locationFunction.
Returns
Inherited from
AbstractHierarchicalLayout.getAbsolutePosition
getHierarchy()
getHierarchy():
HierarchicalLayoutLayer[]
Gets the computed hierarchy. This is returned as an array of objects, one for each level, inside which
there is a nodes array.
Returns
HierarchicalLayoutLayer[]
getOrientation()
getOrientation():
HierarchicalLayoutOrientation
Gets the orientation of the layout - "horizontal" or "vertical".
Returns
"horizontal" or "vertical"