datetimeCoordinates
Turn dates into millisecond offsets from an origin, for a datetime axis.
JavaScript only.
const { values, origin } = datetimeCoordinates(dates);
<Plot data={{ time: values, value }} x={{ type: "datetime", origin }}>…</Plot>Usage
Returns values and origin. Subtracting an epoch origin preserves float32 precision. Use that same origin in the datetime axis definition. Python can subtract the origin before supplying numerical columns.