Skip to main content

Interface: INumberFormatter

Charting Library.INumberFormatter

Specific formatter for number

Hierarchy

Methods

format

format(value?): string

Whatever the input type, formats the data following a certain logic and return that value as a string

Parameters

NameType
value?number

Returns

string

Inherited from

IFormatter.format


formatChange

formatChange(currentPrice, prevPrice): string

Formatter for a price change

Parameters

NameTypeDescription
currentPricenumbercurrent price
prevPricenumberprevious price

Returns

string


parse

parse(value): ErrorFormatterParseResult | SuccessFormatterParseResult<number>

Check if the input value satisfies the logic and return either an error or the result of the parsing

Parameters

NameType
valuestring

Returns

ErrorFormatterParseResult | SuccessFormatterParseResult<number>

Inherited from

IFormatter.parse