TimeSeriesChart

Molecule

The continuous time axis behind `LineChart` / `AreaChart` with `xAxis="time"`: timestamps (ISO strings or epoch ms) in `x`, uneven sampling, series with different instants on one axis, and drag-to-zoom (double-click or "Reset zoom" to leave). Zoom is local to the chart and never reaches the caller. Ticks follow the visible span (24 h `HH:mm`, `d MMM`, `MMM yy`), in `timeZone` when given; the value axis widens to round bounds. Takes the same settings as the band axis (right axis, thresholds, marks, legend values, tooltip options).

Line with drag-to-zoom

Preview

Temperature vs setpoint (drag a range to zoom, double-click to reset)

Code
<%- include('modules/ui/Chart/Chart', { type: 'line', xAxis: 'time', series: series, height: 240, yFormat: 'fmtCelsius' }) %>
<!-- yFormat is the NAME of a global function: window.fmtCelsius = (v) => v + '°C' -->

Area, series sampled at different instants

Preview

Inlet (every 10 min) and outlet (every 15 min) flow

Code
<%- include('modules/ui/Chart/Chart', { type: 'area', xAxis: 'time', series: [inlet, outlet], height: 240 }) %>

Zoom disabled

Preview

Same data, zoom={false}

Code
<%- include('modules/ui/Chart/Chart', { type: 'line', xAxis: 'time', series: series, zoom: false }) %>
Source modules/ui/Chart/scripts/series.js