PitchKit
API Reference@pitchkit/coreFunctions

momentumExtent()

function momentumExtent(values): number;

Defined in: packages/core/src/momentum/layout.ts:104

The half-height of the value axis: the largest magnitude in the data, rounded up to a round number.

Symmetric about zero, because a bar's direction is its meaning — home up, away down — and an axis that gave one side more room would make equal pressure look unequal. A chart whose values are all zero gets 1, so the zero line has somewhere to sit.

Parameters

ParameterType
valuesreadonly number[]

Returns

number

On this page