Documentation / @finchart/core / index / PriceFormatOptions
Interface: PriceFormatOptions
Defined in: packages/core/src/axis/price-format.ts:22
A price-format helper — a pure function that plugs into an axis format, a crosshair, and a tooltip alike. The vocabulary follows lightweight-charts: precision (decimal places), minMove (the tick size — an instrument quoted in 0.05 increments only ever speaks in multiples of 0.05), compact (1.2M — where a volume axis belongs).
Given a tick interval as the second argument, it chooses the number of digits that keep neighboring ticks from rendering as the same string (preventing "1.1M·1.1M·1M·1M"). If precision or minMove is given explicitly, the interval is ignored — precision belongs to the caller.
Properties
compact?
optionalcompact?:boolean
Defined in: packages/core/src/axis/price-format.ts:28
1.2M · 3.4K — shortens large numbers. Where a volume axis belongs.
locale?
optionallocale?:string
Defined in: packages/core/src/axis/price-format.ts:29
minMove?
optionalminMove?:number
Defined in: packages/core/src/axis/price-format.ts:26
The tick size — snaps the value to a multiple of this before formatting.
precision?
optionalprecision?:number
Defined in: packages/core/src/axis/price-format.ts:24
Decimal places. Derived from minMove if omitted, otherwise 2.