Specify custom formatting logic by supplying a function that returns a string. Example usage:
( value, range ) => { // 'value' = number position of tick along the *Axis*. // 'range' = *FormattingRange* object that can be used to find the total range of the *Axis*, if needed.
// Return *string*. return"any string" }
( value ) => { // JS *Date* API can be used to interpret numeric *Axis* positions as *UTC Date/Time*, exposing a multitude of handy methods. constdate = newDate( value ) returndate.toLocaleTimeString() }
Type union of supported methods of defining a formatting behavior for DateTime TickStrategy.
1. Intl.DateTimeFormatOptions:
Use JavaScript API for formatting logic by supplying a Intl.DateTimeFormatOptions object. Example usage:
For complete documentation of valid keys and values, refer to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
2. Custom formatting function:
Specify custom formatting logic by supplying a function that returns a string. Example usage:
JS Date documentation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date