Missing values in a time series should show as a gap unless you know what the value was. Show a zero only when silence means zero by definition, carry the last value forward only for signals that report on change, and interpolate only short gaps in slow physical quantities. Each choice tells the reader of the chart something different.
I design dashboards for operators, and a filled gap is the chart element I trust least, because nobody reading the chart can see that it was filled.
Which choice fits which signal?
The type of signal decides it. A measured value, a counter and a state each mean something different when a reading is missing.
| Signal | Show missing data as | What a wrong choice tells the reader |
|---|---|---|
| Measured value on a fixed interval (flow, pressure, temperature) | A gap; interpolate only a short one | A zero reads as a stopped pump |
| State that reports on change (valve open, pump running, mode) | The last value, up to a limit | A gap reads as a lost state that was never lost |
| Value sent only when it moves past a deadband | The last value, up to a limit | A gap hides a value that held steady |
| Events counted per interval, from a device known to be reporting | Zero | A gap suggests lost data where nothing happened |
| Cumulative counter (energy, volume, pulses) | A gap, then one delta over the whole gap | A zero followed by a large jump shows a spike that never happened |
Should missing sensor data be shown as zero?
Only when the absence of a reading means nothing happened, and you know the device was alive. For a measured value, a zero says something about the process, and a flow of zero says the pump stopped.
Zeros also bend averages. Take a flow of 40 m³/h read every 10 minutes, with 3 of the hour’s 6 readings missing. The average of the readings that arrived is 40 m³/h; with the gaps filled as zeros it is 20 m³/h. Average what arrived and show the count beside it, as in downsampling time series data. Counters have the same trap. When a cumulative energy meter comes back after an outage, the difference between its two readings covers the whole gap, so I show it as one bar spanning the gap.
What is forward fill?
Forward fill, also called last observation carried forward, repeats the last known value until a new one arrives. It is correct for signals that only report when they change, such as a valve position, a pump’s run state or a setpoint, because the value really did hold.
Forward fill becomes dangerous when the device stops reporting, because it draws a flat, believable line through an outage. I give every forward-filled signal a limit tied to how often its device is expected to report, after which the chart shows a gap. Raising an alarm when a sensor goes quiet is a separate job, covered in alert on missing data.
When should you interpolate sensor data?
Interpolate only short gaps in slow, continuous quantities, such as a tank level or a room temperature, and only for display. Linear interpolation draws a straight line between the readings on either side of the gap, a line nobody measured.
Never interpolate states, counts or anything that feeds an alarm or a report. A chart that joins its points across a gap is interpolating too, whether anyone chose it or not, so I check that setting on every line chart. Gaps from a link dropping out, like those in cellular signal at remote sites, should stay visible, because the gap is the evidence. On a chart with several signals, each one needs its own rule.
Frequently asked questions
Should gaps be filled in the stored data or only on the chart?
Only on the chart, or in the query that feeds it. Keep the stored readings as they arrived, gaps included, and apply the fill when you read them, so a later chart or audit can choose differently. Note the fill method in the chart’s description so readers know a line was filled.
Does a reading that arrives late fill the gap?
It can. A device that buffers readings during an outage and sends them when the link returns fills the gap after the fact, so the same chart can look different an hour later. Treat a fresh gap as possibly temporary, and do not write zeros into it that late readings would contradict.
Is forward fill the same as a step chart?
A step chart draws each value as a flat line until the next point, which is forward fill in drawing form. It suits states and values sent on change. For a measured value read on a fixed interval, a straight line between neighbouring readings is the more honest drawing, as long as the line breaks at a gap.

