Documentation / @ripl/charts / formatTimeLabel
Function: formatTimeLabel() ​
formatTimeLabel(
value,spanMs):string
Defined in: charts/src/core/options.ts:723
Formats a time-axis tick for display, adapting the format to the domain span; multi-year spans show the year, month-scale spans show abbreviated month and year, day-scale spans show dates, and anything shorter shows times. An explicit axis format always wins over this default.
Parameters ​
| Parameter | Type | Description |
|---|---|---|
value | Date | The tick's date value. |
spanMs | number | The axis domain span in milliseconds. |
Returns ​
string
The formatted label.