dynamicTimeFormatter

val dynamicTimeFormatter: CartesianValueFormatter(source)

A dynamic CartesianValueFormatter that adjusts the time format based on the total data span (CartesianRanges.xLength).

Since chart data is already filtered by TimeFrame, xLength approximates the visible window. Vico's formatter receives CartesianMeasuringContext during measurement passes — not CartesianDrawingContext — so context.zoom is unavailable and we intentionally avoid it.

Data spanFormatExample
≤ 1 hourTime with seconds3:45:12 PM
≤ 2 daysTime only3:45 PM
≤ 14 daysDate + time (two-line)4/9/26 ↵ 3:45 PM
> 14 daysDate only4/9/26