Data and edge cases
Production data is messy, and a chart that quietly hides that is worse than no chart. These are the rules every chart follows.
Missing values
null, undefined and NaN mean missing.
- Lines and areas break at missing values. They're never interpolated. A point with no neighbours is drawn as a dot so it doesn't disappear.
- Stacked areas leave the whole column empty if any layer is missing there, because a total with a hole in it is wrong.
- Bars draw nothing for a missing value. Zero is drawn as zero.
- Heatmaps hatch missing cells and the tooltip says "No data". Missing is never coloured as zero.
- Cohorts leave unobserved cells blank, and averages only use observed cells.
A note under the chart says how many values are missing.
Invalid values
A string, object or boolean where a number is expected is invalid. The chart doesn't guess ("12" is not silently converted). It shows "This chart can't be drawn" with the key and sample values, so the bug is visible in development.
Impossible data
| Chart | Rejected | Why |
|---|---|---|
| Donut, pie, treemap, waffle | Negative values | A share of a whole can't be negative |
| Stacked area, 100% bars, mix shift | Negative values | They can't be stacked honestly |
| Candlestick | high < max(open, close) or low > min(open, close) |
Malformed OHLC rows are listed by date |
| Football field | low > high |
The range would be inverted |
| Sankey | Cycles, self-links, negative flows | Flows must go one way |
| Forecast bands | lower > upper |
The interval would be inverted |
| Index chart | Zero or missing base value | You can't divide by it |
Suspicious data (warnings)
Warnings appear as "Check: …" under the chart:
- Duplicate x values (two rows for "Mar"). Each is drawn, and you're told to aggregate.
- More series than colours (the extras are grey).
- Waterfall subtotals that don't match their steps. The computed value is shown, along with what was given.
- Sankey nodes whose inflow and outflow don't balance.
- Funnel stages that grow.
- Very small samples in histograms and box plots.
Forecasts and partial periods
forecastFromdashes forecast segments, shades the forecast region and labels it "Forecast". Tooltips say "Forecast".partialFrommarks incomplete periods (month to date): faded bars, a shaded region, and "Partial period" in tooltips.- The Pro
ActualVsForecastCharttakes actual and forecast as separate keys and joins them at the last actual, so the two can't be confused.
Axes
- Bars, columns and areas always include zero.
- Lines, dot plots and scatter plots may start elsewhere (
zero={false}), because position, not length, encodes the value. - No chart has two y-axes. Use
ComboChart(two aligned panels),IndexChart(rebased to 100) orSmallMultiples. - Outliers are never clipped. If one point compresses everything else, consider a log transform in your data and say so in the subtitle.
Extreme values
- Very large numbers compact (
$4.2B). Very small non-zero numbers keep two significant digits instead of rounding to0. - Series of very different magnitudes on one axis are a design problem, not a rendering one. Use small multiples or an index chart.
- Large datasets: lines handle tens of thousands of points, and scatter plots stay responsive to a few thousand (smaller dots, no outlines above 400 points).
Dates
With xType="time", date-only ISO strings are read as UTC ("2026-03-01" is March 1 everywhere). Rows are sorted by date. Irregular intervals are spaced in real time, and unreadable dates produce an error naming how many rows failed.