Skip to content

Documentation / @finchart/core / index / ExpandHints

Interface: ExpandHints ​

Defined in: packages/core/src/scale/types.ts:110

Things a scale can ask back for, only when it needs them. There's only one right now — the real floor the log axis uses when it has to invent a lower bound.

Why a function and not a value: computing it means scanning every visible point, and that cost shouldn't be paid every frame by axes that aren't logarithmic — as a callback it's only invoked from LogScale.expand's min <= 0 branch.

Why this isn't just a field on Range: adding a field there broke things in quiet ways — unionRange drops fields when there are two series. An unfilled field failed silently instead of throwing.

Methods ​

minPositive() ​

minPositive(): number | null

Defined in: packages/core/src/scale/types.ts:116

The smallest value greater than 0 in this interval, or null if there is none. The caller is lazy about it — it's only invoked when the log axis hits a non-positive lower bound.

Returns ​

number | null