Time series chart

Readings over time, one line per series: buoys, vessel telemetry, weather. An axis per unit, gaps kept, drag to zoom.

Two units

A buoy's fortnight: temperature at three depths shares the left axis, oxygen saturation has the right. The 8 hour outage on 11.03 stays a gap. Drag across the plot to zoom.

Medium

Stacked

A vessel's day in four units. Four axes on one plot can't be matched to their lines, so each unit gets a panel, on one time axis and one crosshair.

Usage

<TimeSeriesChart
	series={[
		{ key: 'temperature', label: 'Temperature 1 m', unit: '°C', digits: 2, points },
		{ key: 'oxygenSaturation', label: 'Oxygen sat.', unit: '%', digits: 1, points: oxygen },
	]}
	thresholds={[{ value: 80, unit: '%', label: 'Low oxygen' }]}
/>

Rules

  • An axis per unit, never per series. Series in one unit share it, so they compare directly. Two units get a left and a right axis; a third stacks the chart into panels.
  • Each axis says what and in which unit: "Oxygen sat. 1 m (%)". Several series in one unit list their names.
  • Gaps stay gaps. A line drawn across an outage invents readings nobody took.
  • No smoothing and no markers by default: the readings, joined. Thin a long series for drawing (the chart does, past 2000 points), never for the readout.
  • Zoom is a drag across the plot, with a way back. The wheel scrolls the page, as everywhere else.
  • Thresholds are dashed lines with a name, on the axis of their unit.