Skip to content

charton API


charton API / @chart-on/core / index / formatCompact

Function: formatCompact() ​

formatCompact(value): string

Defined in: packages/core/src/util/format.ts:90

A number shortened with a K, M, B or T suffix and at most two decimals, e.g. 1.5M, for volumes and sizes.

Parameters ​

value ​

number

Returns ​

string