TreemapLayout

extends Layout

The TreemapLayout class represents a layout that positions objects using the treemap algorithm. To create a TreemapLayout object and apply it to a collection, use the layout function:

let tl = msc.layout("treemap", {width: 800, height: 500});
collection.layout = tl;

Properties

propertyexplanationtypedefault value
type the type of the layoutString“treemap”
group the group that uses this layoutGroup
widththe width of the top level containerNumber
heightthe height of the top level containerNumber
topthe y coordinate of the top level containerNumber
leftthe x coordinate of the top level containerNumber

Methods inherited from Layout

methodexplanationreturn type
clone() returns a copy of this layoutvoid
run() apply this layoutvoid