createTilingSplitNode
createTilingSplitNode(
direction,children):TilingSplitNode
Defined in: packages/client/src/lib/chart-manager/tiling.ts:115
Builds a validated split node.
A weight that is zero, negative or fractional does not fail loudly during
layout: it hands a child a region of zero or negative extent, or a sum that
no longer divides the parent, so the malformed geometry surfaces far from
the code that invented the weight. Guarding the sum is not enough — weights
[5, -1] sum to 4 and still overlap.
Parameters
Section titled “Parameters”direction
Section titled “direction”children
Section titled “children”readonly [{ node?: TilingTreeNode; weight: number; }, { node?: TilingTreeNode; weight: number; }, { node?: TilingTreeNode; weight: number; }]
Returns
Section titled “Returns”Throws
Section titled “Throws”If children’s weights violate the split invariant —
see assertValidSplitWeights.