Skip to content

Function: beeswarmLayout()

ts
function beeswarmLayout(x, opts?): number[];

Defined in: ml/charts.ts:498

Deterministic 1-D beeswarm: given point x-positions, return a symmetric vertical offset per point (in ±spread/2) so overlapping points fan out by local density. Pure — no RNG. Backs addShapBeeswarm.

Parameters

ParameterType
xArrayLike<number>
optsBeeswarmOptions

Returns

number[]

MIT licensed. WebGL2 required.