PitchKit
API Reference@pitchkit/coreFunctions

overlayOrder()

function overlayOrder(lengths): number[];

Defined in: packages/core/src/polar/wedge.ts:88

Draw order for series sharing one wedge: longest first, so each shorter slice sits on top of the longer one behind it and stays visible. Ties keep series order; a missing slice draws nothing, so is left out.

Pass each slice's drawn length (its tip radius), not its raw value: on a lower-is-better metric the lower value is the longer slice, so ordering by value would paint the longer slice over the shorter one.

Parameters

ParameterType
lengthsreadonly (number | undefined)[]

Returns

number[]

On this page