ClusterLayout

extends Layout

The ClusterLayout class represents a layout that positions objects in a cluster tree. It supports two modes controlled by the radial property: in radial mode the tree is arranged around a center point using angleExtent, radius, x, and y; in non-radial mode the tree is arranged along an axis using orientation, width, height, left, and top. To create a ClusterLayout object and apply it to a collection, use the layout function:

let cl = msc.layout("cluster", {radial: true, radius: 300});
collection.layout = cl;

Properties

propertyexplanationtypedefault value
angleExtentthe angular extent of the radial layout in degreesNumber360
heightthe height of the non-radial layout areaNumber600
leftthe x offset of the non-radial layout areaNumber60
orientationthe orientation of the non-radial layoutString“horizontal”
radiusthe radius of the radial layoutNumber300
refElements the reference elements used by this layoutArray[]
topthe y offset of the non-radial layout areaNumber100
typethe type of the layoutString“cluster”
widththe width of the non-radial layout areaNumber800
xthe x coordinate of the radial layout centerNumber300
ythe y coordinate of the radial layout centerNumber300

Methods

methodexplanationreturn type
clone()returns a copy of this layoutClusterLayout
isRadial()returns whether the layout is in radial modeBoolean

Methods inherited from Layout

methodexplanationreturn type
addRefElement(re)adds a reference element to this layoutvoid
clearRefElements()removes all reference elements from this layoutvoid