Skip to main content

format_tick

Function format_tick 

Source
pub fn format_tick(epoch: f64, spacing: f64, unit: DtUnit) -> String
Expand description

Format a single tick (epoch seconds, UTC) for the given spacing/unit, mirroring silx bestFormatString + datetime.strftime.

For DtUnit::MicroSeconds the silx code additionally strips a common run of trailing zeros across all labels; that cross-label step needs the whole tick set, so it is done in format_ticks. This single-tick helper returns the raw %S.%f form for microseconds.