Skip to main content

Interface: IFormatter<T>

Charting Library.IFormatter

Definition of a formatter

Type parameters​

Name
T

Hierarchy​

Methods​

format​

format(value?, options?): string

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

Parameters​

NameType
value?T
options?FormatterFormatOptions

Returns​

string


parse​

Optional

parse(value, options?): ErrorFormatterParseResult | SuccessFormatterParseResult<T>

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

Parameters​

NameType
valuestring
options?FormatterParseOptions

Returns​

ErrorFormatterParseResult | SuccessFormatterParseResult<T>