PitchKit
API Reference@pitchkit/coreFunctions

normaliseMetric()

function normaliseMetric(value, range): NormalisedValue | undefined;

Defined in: packages/core/src/polar/metric.ts:33

Places value on its metric's axis, applying the lower-is-better flip and clamping to the axis. undefined for a missing or non-finite value, which draws nothing rather than a zero.

A range with no width (min === max) puts every value on the middle ring, since there is no direction to place it in.

Parameters

ParameterType
valuenumber | null | undefined
rangePolarRange

Returns

NormalisedValue | undefined

On this page