Charts ยท console.warn
axis.x.window.now did not return a time, so ...
Printed by Charts, prefixed [lattice], since 1.72.0.
Warnings reference › chart.axis.window.now
- Identifier
chart.axis.window.now- Raised by
- Charts
- Since
- 1.72.0
What happened
A rolling axis.x.window named its own clock with now, and calling it did not produce a finite number. The window fell back to Date.now(), so a replay pane is measured against the wall clock and its recorded readings will look too old to draw.
The fix
Return epoch milliseconds from now - () => replay.clock where replay.clock is a number, not a Date, a string or undefined.
The smallest fix
createChart({ grid, container, axis: { x: { window: { kind: 'time', span: 300000, now: () => replayClockMs } } } });
Reference
Covered in full at the API reference.