OptionalfunctionFunction body string for custom formatting.
The function receives value as parameter and must return a string.
OptionaltypeFormat type specifier for common formatting patterns.
Use with decimals, currency, locale, dateOptions for customization.
OptionaldecimalsNumber of decimal places for numeric formatters. Used with: currency, percent, fixed, number, scientific
OptionalcurrencyISO 4217 currency code for currency formatter.
OptionallocaleBCP 47 locale string for locale-aware formatters. Used with: currency, number, date
OptionaldateOptions for Intl.DateTimeFormat when using date type.
Configuration for formatting values on an axis.
Two ways to specify formatting:
function- Function body string (for custom logic)type- Format type specifier (for common patterns)Example
Example