API / Utilities / FormatNumberOptions

Defined in: src/core/types/formatter.ts:18

Extends

Properties

Property Type Description
format? "number" | "percent" Display mode for the numeric value. - 'number' — plain number (default). - 'percent' — value is multiplied by 100 and rendered with a % suffix.
labelMode? string Internal rendering hint for axis label layout. Not intended for public use.
lang? string BCP 47 language tag used for locale-aware formatting (e.g. 'en', 'ru'). Defaults to the application locale when omitted.
multiplier? number Factor applied to the value before formatting. For example, multiplier: 1000 converts seconds to milliseconds.
postfix? string String appended to the formatted value (e.g. ' USD').
precision? number | "auto" Number of decimal places to display. Use 'auto' to determine precision automatically based on the value magnitude.
prefix? string String prepended to the formatted value (e.g. '$').
showRankDelimiter? boolean When true, inserts a thousands separator (e.g. 1 500 000).
unit? null | "auto" | "k" | "m" | "b" | "t" Compact unit suffix applied to large numbers. - 'auto' — picks the most appropriate unit automatically (k, m, b, t). - 'k' — thousands (÷ 1 000). - 'm' — millions (÷ 1 000 000). - 'b' — billions (÷ 1 000 000 000). - 't' — trillions (÷ 1 000 000 000 000). - null — no unit suffix.