package tree_layout
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Squarified Treemaps
Treemaps represent trees as nested rectangles. A subtree is a larger rectangle that contains all its children. Squarified treemaps are treemaps which attempts to keep rectangles as square as possible. Functions in this module expect a function to compute the area of a node, and return sequences of pair of nodes and rectangles.
val layout :
area:('a -> float) ->
children:('a -> 'a Iter.t) ->
Common.rectangle ->
'a ->
('a * Common.rectangle) Iter.t
layout ~area ~children rect tree
computes a squarified treemap of tree
and return a sequence of subtrees and their positions.
val squarify :
area:('a -> float) ->
Common.rectangle ->
'a Iter.t ->
('a * Common.rectangle) Iter.t
squarify ~area rect l
takes a sequence of elements l
and decorate them with positions.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>