Skip to content

squarify

squarify(items, rect): SquarifiedRect[]

Defined in: perf/layout/squarify.ts:52

Pack items into rect so each rectangle’s area ≈ value × area / total. Items must be sorted descending by value for the squarified algorithm to achieve its aspect-ratio guarantees; this function does NOT sort, callers should pre-sort.

Parameters

items

SquarifyItem[]

rect

SquarifyRect

Returns

SquarifiedRect[]