Charts

15 degenerate shapes

Six telemetry forms as hand-rolled SVG on @nkapp/lib/isomorphic — no chart library, no hook, no 'use client', and a pointer readout built from :hover alone. That is why they exist in this shape: apps/website and apps/status render on the server, and a chart that cannot be a Server Component is a chart those two surfaces have to reimplement. The gallery is the short half of this page. The long half is what each one does when the data is broken, because that is the state a Hub chart is in during its first week.

The six forms

Each of these answers a plotting need the Hub or the status page already has — the surface is named on every specimen, and that is the difference between a bench and a gallery. They share one prop surface — label, unit, valueFormat, tone, emptyLabel, animate — so a dashboard that swaps one form for another does not rewrite its call site. Hover any mark for its reading.

NkChartSpline

tone=primary

Hub → service detail → Response time. A value over time, where what the reader takes from it is the shape of the movement — so the baseline is auto and the axis hugs the data. Zero-anchoring this series would flatten the 131→171 ms excursion, which is the only thing in it.
This is the one chart on the page in tone="primary". The tone is opt-in for the single series on a view that is the live signal; a second one here would spend the whole of specs/DESIGN.md §2's accent budget and the page would lose its point of attention.

Response time
PointValue (ms)
13:00131 ms
2139 ms
3142 ms
4138 ms
5147 ms
6151 ms
13:30149 ms
8144 ms
9141 ms
10137 ms
11140 ms
12146 ms
14:00158 ms
14171 ms
15166 ms
16159 ms
17152 ms
18148 ms
14:30145 ms
20143 ms
21140 ms
22139 ms
23142 ms
15:00142 ms

NkChartArea

baseline=zero

status.nanokit.dev → the egress band. An area encodes value as the filled region under the curve, so the baseline is part of the encoding and defaults to zero: float it at the minimum and a series running near capacity renders as a sliver that reads as almost nothing. The wash is one flat fill-foreground/10, not a gradient — a linearGradient needs a document-unique id, and two charts of the same tone on one page would collide on it.

Egress
PointValue (Mbit/s)
00:00220 Mbit/s
2198 Mbit/s
3186 Mbit/s
4174 Mbit/s
5169 Mbit/s
6181 Mbit/s
06:00240 Mbit/s
8310 Mbit/s
9402 Mbit/s
10466 Mbit/s
11512 Mbit/s
12534 Mbit/s
12:00561 Mbit/s
14590 Mbit/s
15618 Mbit/s
16604 Mbit/s
17571 Mbit/s
18548 Mbit/s
18:00596 Mbit/s
20640 Mbit/s
21672 Mbit/s
22651 Mbit/s
23588 Mbit/s
23:00430 Mbit/s

NkChartBars

no baseline

Hub → overview → Requests. A bar encodes value as length, so the ratio between two bars is part of what the reader takes away — and there is therefore no baseline prop to move. Each column is a round-capped stroked line rather than a <rect rx>, so it is exactly barWidth CSS pixels at every card width instead of fattening as the card grows.

Requests
BarValue (req/min)
081,240 req/min
092,980 req/min
104,120 req/min
114,460 req/min
123,870 req/min
133,310 req/min
144,580 req/min
155,020 req/min
164,310 req/min
173,140 req/min
181,890 req/min
19940 req/min

NkChartDonut

input order

Hub → volumes → Disk allocation. Six stroked arcs at most, one ink stepped by alpha — a sequential scale on an ordered quantity, not a categorical palette on things with no identity. Nothing is sorted internally: sorting by value would mean filtering out one volume repaints every other one, so a reader who learned which segment was pgdata is now looking at uploads.

5 partsunit="GiB" — the centre is the total
Disk allocation
SegmentValue (GiB)Share
pgdata184 GiB37.3%
silo126 GiB25.6%
uploads88 GiB17.8%
backups61 GiB12.4%
registry34 GiB6.9%
Total493 GiB100%
  1. pgdata
  2. silo
  3. uploads
  4. backups
  5. registry

That row is a legend, and it is built from the ring's own ramp: NK_CHART_RAMP is exported on @nkapp/lib/isomorphic, so each swatch carries the same alpha step as the arc it names and the two cannot drift the day a step changes. The library still ships no NkChartLegendpart — this is what one would be, and this page is its first consumer. Order is the ring's order, darkest first, which is all the ramp encodes. A sighted reader gets each segment's own name from its SVG <title>, the one place in the family that falls back to browser chrome, because an angular hit zone cannot be built without JavaScript.

9 partsfolded at 6 — the tail becomes one segment
Disk allocation, full inventory
SegmentValue (GiB)Share
pgdata184 GiB33.9%
silo126 GiB23.2%
uploads88 GiB16.2%
backups61 GiB11.3%
registry34 GiB6.3%
logs22 GiB4.1%
pgdata-branch-fix-42714 GiB2.6%
node_modules9 GiB1.7%
caddy-data4 GiB0.7%
Total542 GiB100%

The seventh alpha step would be indistinguishable from the sixth, so a seventh slice would read as a duplicate. The folded volumes keep their own rows in the accessible table — merged in the picture, never hidden.

NkChartHeatmap

91 days · 3 states

Hub → project → activity. Thirteen weeks of deploy frequency. Three marks, because an idle day, an active day and a day with no reading are three different facts: a veil for idle, four alpha steps for activity, and a dashed outline for no reading — dashed rather than merely fainter, so it survives a greyscale render. Conflating the last two invents a quiet week out of a collector outage. There are three such days in here.
Which weekday a row is depends on weekStartsOn, and the default is 1 — the ISO week, Monday first. It is a prop and not an assumption because the two layouts put a different pair of days at the bottom, and a reader looking for “the quiet weekend band” finds it in the wrong place if the component guessed.

weekStartsOn 1 · ISO, the default
Deploys
DayValue (deploys)
Jul 27, 20263 deploys
Jul 28, 202611 deploys
Jul 29, 202618 deploys
Jul 30, 20267 deploys
Jul 31, 20265 deploys
Aug 1, 20260 deploys
Aug 2, 20260 deploys
Aug 3, 20267 deploys
Aug 4, 202610 deploys
Aug 5, 202617 deploys
Aug 6, 20266 deploys
Aug 7, 20264 deploys
Aug 8, 20260 deploys
Aug 9, 20260 deploys
Aug 10, 20266 deploys
Aug 11, 20269 deploys
Aug 12, 202616 deploys
Aug 13, 202610 deploys
Aug 14, 20263 deploys
Aug 15, 20260 deploys
Aug 16, 20260 deploys
Aug 17, 20265 deploys
Aug 18, 202613 deploys
Aug 19, 202615 deploys
Aug 20, 20269 deploys
Aug 21, 20262 deploys
Aug 22, 20260 deploys
Aug 23, 20260 deploys
Aug 24, 20264 deploys
Aug 25, 202612 deploys
Aug 26, 202614 deploys
Aug 27, 20268 deploys
Aug 28, 20266 deploys
Aug 29, 20260 deploys
Aug 30, 20260 deploys
Aug 31, 20263 deploys
Sep 1, 202611 deploys
Sep 2, 202618 deploys
Sep 3, 20267 deploys
Sep 4, 20265 deploys
Sep 5, 20260 deploys
Sep 6, 20260 deploys
Sep 7, 20267 deploys
Sep 8, 202610 deploys
Sep 9, 2026No data
Sep 10, 2026No data
Sep 11, 2026No data
Sep 12, 20260 deploys
Sep 13, 20260 deploys
Sep 14, 20266 deploys
Sep 15, 20269 deploys
Sep 16, 202616 deploys
Sep 17, 202610 deploys
Sep 18, 20263 deploys
Sep 19, 20260 deploys
Sep 20, 20260 deploys
Sep 21, 20260 deploys
Sep 22, 20260 deploys
Sep 23, 20261 deploys
Sep 24, 20260 deploys
Sep 25, 20260 deploys
Sep 26, 20260 deploys
Sep 27, 20260 deploys
Sep 28, 20260 deploys
Sep 29, 20260 deploys
Sep 30, 20261 deploys
Oct 1, 20260 deploys
Oct 2, 20260 deploys
Oct 3, 20260 deploys
Oct 4, 20260 deploys
Oct 5, 20263 deploys
Oct 6, 202611 deploys
Oct 7, 202618 deploys
Oct 8, 20267 deploys
Oct 9, 20265 deploys
Oct 10, 20260 deploys
Oct 11, 20260 deploys
Oct 12, 20267 deploys
Oct 13, 202610 deploys
Oct 14, 202617 deploys
Oct 15, 20266 deploys
Oct 16, 20264 deploys
Oct 17, 20260 deploys
Oct 18, 20260 deploys
Oct 19, 20266 deploys
Oct 20, 20269 deploys
Oct 21, 202616 deploys
Oct 22, 202610 deploys
Oct 23, 20263 deploys
Oct 24, 20260 deploys
Oct 25, 20260 deploys
weekStartsOn 0 · Sunday first
Deploys, Sunday-first calendar
DayValue (deploys)
Jul 27, 20263 deploys
Jul 28, 202611 deploys
Jul 29, 202618 deploys
Jul 30, 20267 deploys
Jul 31, 20265 deploys
Aug 1, 20260 deploys
Aug 2, 20260 deploys
Aug 3, 20267 deploys
Aug 4, 202610 deploys
Aug 5, 202617 deploys
Aug 6, 20266 deploys
Aug 7, 20264 deploys
Aug 8, 20260 deploys
Aug 9, 20260 deploys
Aug 10, 20266 deploys
Aug 11, 20269 deploys
Aug 12, 202616 deploys
Aug 13, 202610 deploys
Aug 14, 20263 deploys
Aug 15, 20260 deploys
Aug 16, 20260 deploys
Aug 17, 20265 deploys
Aug 18, 202613 deploys
Aug 19, 202615 deploys
Aug 20, 20269 deploys
Aug 21, 20262 deploys
Aug 22, 20260 deploys
Aug 23, 20260 deploys
Aug 24, 20264 deploys
Aug 25, 202612 deploys
Aug 26, 202614 deploys
Aug 27, 20268 deploys
Aug 28, 20266 deploys
Aug 29, 20260 deploys
Aug 30, 20260 deploys
Aug 31, 20263 deploys
Sep 1, 202611 deploys
Sep 2, 202618 deploys
Sep 3, 20267 deploys
Sep 4, 20265 deploys
Sep 5, 20260 deploys
Sep 6, 20260 deploys
Sep 7, 20267 deploys
Sep 8, 202610 deploys
Sep 9, 2026No data
Sep 10, 2026No data
Sep 11, 2026No data
Sep 12, 20260 deploys
Sep 13, 20260 deploys
Sep 14, 20266 deploys
Sep 15, 20269 deploys
Sep 16, 202616 deploys
Sep 17, 202610 deploys
Sep 18, 20263 deploys
Sep 19, 20260 deploys
Sep 20, 20260 deploys
Sep 21, 20260 deploys
Sep 22, 20260 deploys
Sep 23, 20261 deploys
Sep 24, 20260 deploys
Sep 25, 20260 deploys
Sep 26, 20260 deploys
Sep 27, 20260 deploys
Sep 28, 20260 deploys
Sep 29, 20260 deploys
Sep 30, 20261 deploys
Oct 1, 20260 deploys
Oct 2, 20260 deploys
Oct 3, 20260 deploys
Oct 4, 20260 deploys
Oct 5, 20263 deploys
Oct 6, 202611 deploys
Oct 7, 202618 deploys
Oct 8, 20267 deploys
Oct 9, 20265 deploys
Oct 10, 20260 deploys
Oct 11, 20260 deploys
Oct 12, 20267 deploys
Oct 13, 202610 deploys
Oct 14, 202617 deploys
Oct 15, 20266 deploys
Oct 16, 20264 deploys
Oct 17, 20260 deploys
Oct 18, 20260 deploys
Oct 19, 20266 deploys
Oct 20, 20269 deploys
Oct 21, 202616 deploys
Oct 22, 202610 deploys
Oct 23, 20263 deploys
Oct 24, 20260 deploys
Oct 25, 20260 deploys

NkKpiCard

deltaDirection

Hub masthead → the headline metric. One figure, a signed delta and a de-emphasised trend. deltaDirection defaults to neutral on purpose: up is good for throughput and bad for latency, error rate, queue depth and cost, so a component that assumed otherwise would paint a latency regression green. The first card says down-is-good and earns its colour; the fourth says nothing and stays in muted ink.

p95 latency
142ms−19 msdecreasevs last hour
Trend: 12 readings, 139 ms to 168 ms, latest 142 ms.
Throughput
4,310req/min+620 req/minincreasevs last hour
Trend: 12 readings, 940 req/min to 5,020 req/min, latest 940 req/min.
Volumes
493 GiB+13 GiBincrease7d
Trend: 7 readings, 480 GiB to 493 GiB, latest 493 GiB.
Queue wait
—

The fourth card is the no-reading state, and it renders the invalid marker rather than 0 — a KPI that prints zero when it has nothing is the one failure mode that is indistinguishable from good news. The third takes no unit at all and a valueFormat instead, which is §2.

No chart infers a unit

Data is the call site's to invent. Units are not derived from it, ever — a chart that guessed % because its values happened to land under 100 would mislabel every byte count it was handed.

formatReading

four captions

All four marks below are the same seven numbers — [12, 18, 14, 22, 19, 25, 21] — and nothing about the picture says what they measure. Hover each one: the unit in the readout is a string this file passed. The SI space is applied for you, and %, ° and ′ are the standard exceptions that are appended tight, because a space there reads as a typo rather than as correctness.

unit="ms"
Seven readings, milliseconds
PointValue (ms)
112 ms
218 ms
314 ms
422 ms
519 ms
625 ms
721 ms
milliseconds
unit="%"
Seven readings, per cent, set tight
PointValue (%)
112%
218%
314%
422%
519%
625%
721%
per cent, set tight
unit="req/s"
Seven readings, a rate
PointValue (req/s)
112 req/s
218 req/s
314 req/s
422 req/s
519 req/s
625 req/s
721 req/s
a rate
no unit
Seven readings, a bare count
PointValue
112
218
314
422
519
625
721
a bare count
valueFormatwhen the unit is a function of the magnitude
Volume growth
PointValue
112 GiB
218 GiB
314 GiB
422 GiB
519 GiB
625 GiB
721 GiB

The same seven numbers scaled to bytes, with no unit and valueFormat={formatBytes} instead — because the tier is the formatter's job, not the chart's. formatBytes is IEC, so these are GiB and not GB.

The accessible half

Every chart here marks its SVG aria-hidden and carries the series as a visually-hidden <table>. The bench's method applied to accessibility is to show that rather than claim it, so below the table is made visible and the summary sentence is read back off the mounted element. Neither is retyped here.

NkChartSpline · pt.table

revealed

Left: as it ships. Right: the identical call with pt={{ table: { className: 'not-sr-only …' } }}. The pt contract appends to sr-only rather than replacing it, so a consumer can make the table visible — a legitimate request, and how you build a chart with a data grid under it — but cannot make it vanish. That is deliberate: className is append-only and the table's slot protects nothing that would remove it.

as it ships
Response time, svc-api
PointValue (ms)
14:00124 ms
14:05131 ms
14:10148 ms
14:15No data
14:20139 ms
14:25136 ms
14:30142 ms

The table is here, one pixel square and clipped. The 14:15 slot is a hole, and the plot breaks there.

Why a table and not role="img" with a one-line summary: a latency chart exists so somebody can read values off it, and the equivalent of hovering is a table you can step through. “24 readings, 124 to 168 ms” hands a screen-reader user strictly less than the chart gives everybody else — and it is the one representation that cannot be hovered.

role="img" is still right at sparkline scale, and NkKpiCard takes it: there the headline figure and the delta ARE the information, and the twelve-point trend behind them is context. Two specimens down.

pt.table revealed
Response time, svc-api
PointValue (ms)
14:00124 ms
14:05131 ms
14:10148 ms
14:15No data
14:20139 ms
14:25136 ms
14:30142 ms

A <caption> rather than an aria-label, because a caption is what a screen reader announces on entering the table and needs no id plumbing. scope is set on both axes, so cell-by-cell navigation says “14:10, Value 148 ms” and not a bare number. The hole is the word No data, not a zero.

NkChartHeatmap · pt.table

per day

A fortnight, revealed. The table is linear — one row per day — and not a 7×N grid mirroring the picture, because the calendar grid is a layout and the data is a one-dimensional daily series. It is folded into seven rows only because a year of days is 365 cells wide. “Row 3, column 19” names no day, so a reader navigating the grid shape would be made to reconstruct a sequence that was never two-dimensional.
With startDate the row header is the real date. Without one it is the day's 1-based position in the array — which is the index the caller passed, where guessing that day 1 was a Monday would be an invention.

Deploys, last fortnight
DayValue (deploys)
Oct 12, 20264 deploys
Oct 13, 202611 deploys
Oct 14, 20267 deploys
Oct 15, 20262 deploys
Oct 16, 20265 deploys
Oct 17, 20260 deploys
Oct 18, 20260 deploys
Oct 19, 20269 deploys
Oct 20, 202614 deploys
Oct 21, 2026No data
Oct 22, 20263 deploys
Oct 23, 20266 deploys
Oct 24, 20260 deploys
Oct 25, 20260 deploys

NkKpiCard · trendA11y

summary

This is the one component in the family that does not get a table by default, and the reason is a KPI row: six cards would be six tables to step past in exchange for a series nobody asked for. The headline figure and the delta are ordinary HTML text — already announced, already selectable — and the trend behind them is context, so trendA11y defaults to summary: one factual sentence built from the series rather than interpreted from it.
The sentences below were read off the rendered element after mount, not written here. table and hidden are both one prop away.

p95 latency
142ms−19 msdecreasevs last hour
Trend: 12 readings, 139 ms to 168 ms, latest 142 ms.
trendA11y="summary" · read off the DOM

Read off the mounted element — nothing yet, because the server pass has no DOM.

Three channels carry the delta and none of them is colour alone: a drawn arrow, a typographic sign — a real U+2212 minus, not a hyphen — and the hue. The word decrease in that list is the fourth, because “down” is not derivable from a + by a screen reader reading a number.

NkChartDataTable

found here

Why this was one element and not a class of them is a checkable rule rather than a judgement call. sr-only sets position: absolute, and absolute positioning blockifies the display type — so an sr-only <span>, <div>, <th> and <caption> all compute to display: block and all measure exactly 1px. display: table is the one value blockification leaves alone. So an sr-only element is exposed iff its computed display is table or inline-table — the library audit found 13 sr-only sites and exactly 1 of them exposed.

The library carries the class now, and chart-parts.test.tsx holds it to its reason with a test that fails if it is ever tidied away as a stray utility on an invisible element. This page therefore has no page-level rule of its own: the document above is 360px wide because chart-parts.tsx is correct, not because this file compensates for it.

Correct
A visually-hidden element contributes nothing to the document's scrollable overflow. One utility on the component's own class string — cn('sr-only table-fixed', className) — is the whole fix, and it is a containment fix, not a collapse: a fixed table stops expanding past its containing block, which is all that was needed, because the overflow came from the shrink-wrap and not from the box existing. The box is still there. Measured on this page at 360px, a fixed table is ~315px wide with its right edge at 345 — inside the viewport, contributing nothing to scrollWidth, and still a <table> in the accessibility tree.
Regressed
Measured at a 360px viewport, before the fix: document.scrollWidth 391 against a clientWidth of 360 — 31px of horizontal page scroll, caused entirely by tables nobody could see. Two facts combined. sr-only hides by painting (Tailwind v4 spells it clip-path: inset(50%)), and a clip-path does not remove an element from the document's scrollable overflow. And a display: table box treats width: 1px as a minimum it is free to ignore, so it shrink-wrapped to its content — measured then at 147px, from an element the recipe believes is 1px wide.
It needed no bad input to fire: a correct chart with correct data did it, on a phone, in any of the apps. That is why it sits in this section rather than in the degenerate half.

Degenerate input

All 15 shapes the library pins per chart in chart-degenerate.test.tsx, live. Every one of them is a shape a Hub chart meets in its first week. Below, each is handed to a real NkChartSpline — same component, same props, only the array differs. The caption under each mark is formatted from that array, so it cannot disagree with what you are looking at.
One rule produces all of it: a non-finite number never reaches geometry. The input is partitioned once into readings and holes, and only the readings are projected. It matters because the failure it prevents is all but invisible — SVG renders an unparseable path as nothing at all, nothing throws, and the component returns normally, so one dropped sample presents as an empty card and gets filed as a layout bug.

empty0 slots
No signal
empty: []
PointValue (ms)
[]

The grid, and one line saying there is no signal. Not a blank box.

one hole1 slots
No signal
one hole: [null]
PointValue (ms)
1No data
[null]

A slot exists and carries no reading, so this is the empty state too.

all holes3 slots
No signal
all holes: [null, undefined, NaN]
PointValue (ms)
1No data
2No data
3No data
[null, undefined, NaN]

Three slots, no readings. Same verdict, reached three different ways.

one reading1 slots
one reading: [42]
PointValue (ms)
142 ms
[42]

A dot in the middle of the plot — not on the left frame, which would read as a cropped series.

one reading of zero1 slots
one reading of zero: [0]
PointValue (ms)
10 ms
[0]

The same dot, centred. A measured zero is a reading like any other.

flat4 slots
flat: [7, 7, 7, 7]
PointValue (ms)
17 ms
27 ms
37 ms
47 ms
[7, 7, 7, 7]

A straight line across the vertical middle.

flat at zero3 slots
flat at zero: [0, 0, 0]
PointValue (ms)
10 ms
20 ms
30 ms
[0, 0, 0]

Still the middle. Zero is not the floor of an auto domain.

flat at a fraction3 slots
flat at a fraction: [0.5, 0.5, 0.5]
PointValue (ms)
10.5 ms
20.5 ms
30.5 ms
[0.5, 0.5, 0.5]

Still the middle — the half-span is symmetric, so where flat sits never depends on the value.

hole in the middle3 slots
hole in the middle: [1, NaN, 3]
PointValue (ms)
11 ms
2No data
33 ms
[1, NaN, 3]

Two dots and a gap. The line is never drawn through time nothing was collected for.

hole at both ends4 slots
hole at both ends: [null, 2, 3, null]
PointValue (ms)
1No data
22 ms
33 ms
4No data
[null, 2, 3, null]

The run sits in the middle two slots; the outer slots stay empty and keep their width.

infinity3 slots
infinity: [1, Infinity, 3]
PointValue (ms)
11 ms
2No data
33 ms
[1, Infinity, 3]

Infinity is a hole, exactly like NaN — a span of Infinity would flatten every other reading onto the floor.

negative3 slots
negative: [-5, 0, 5]
PointValue (ms)
1-5 ms
20 ms
35 ms
[-5, 0, 5]

Plotted, with the zero line drawn where zero actually falls.

all negative3 slots
all negative: [-9, -4, -6]
PointValue (ms)
1-9 ms
2-4 ms
3-6 ms
[-9, -4, -6]

An all-negative domain. No zero line, because zero is outside it.

three orders of magnitude3 slots
three orders of magnitude: [1, 1, 9000]
PointValue (ms)
11 ms
21 ms
39,000 ms
[1, 1, 9000]

Spanned, not rescaled. The two small readings sit near the floor, which is the truth about them.

long90 slots
long: [0, 1, 2, …, 5]
PointValue (ms)
10 ms
21 ms
32 ms
43 ms
54 ms
65 ms
76 ms
80 ms
91 ms
102 ms
113 ms
124 ms
135 ms
146 ms
150 ms
161 ms
172 ms
183 ms
194 ms
205 ms
216 ms
220 ms
231 ms
242 ms
253 ms
264 ms
275 ms
286 ms
290 ms
301 ms
312 ms
323 ms
334 ms
345 ms
356 ms
360 ms
371 ms
382 ms
393 ms
404 ms
415 ms
426 ms
430 ms
441 ms
452 ms
463 ms
474 ms
485 ms
496 ms
500 ms
511 ms
522 ms
533 ms
544 ms
555 ms
566 ms
570 ms
581 ms
592 ms
603 ms
614 ms
625 ms
636 ms
640 ms
651 ms
662 ms
673 ms
684 ms
695 ms
706 ms
710 ms
721 ms
732 ms
743 ms
754 ms
765 ms
776 ms
780 ms
791 ms
802 ms
813 ms
824 ms
835 ms
846 ms
850 ms
861 ms
872 ms
883 ms
894 ms
905 ms
[0, 1, 2, …, 5]

Ninety slots. The marks thin, the axis ticks thin, nothing scrolls sideways.

The honest cost of this grid, stated rather than hidden: it is 15 real charts, so it is 15 visually-hidden tables a screen-reader user steps past to reach §5 — which is exactly the cost NkKpiCard cites for defaulting to a one-line summary instead. Here the data is also in §11's visible table, so nothing is gated behind them; on a dashboard, 15 charts in one view would be a reason to reach for NkKpiCard for the tiles and keep the tables for the one chart that is the view's subject.

Nothing to plot

Three of those fifteen shapes carry no reading at all, by three different routes — an empty array, a single hole, and a slot array of null, undefined and NaN. All three reach the same verdict, and the verdict is a rendered state rather than an absence: the grid is still drawn, so the card reads as an instrument with no signal rather than as a render that failed.

emptyLabel

the caller's words

The line in the middle is the caller's own, because “No data” is right for a volume list and wrong for a bridge that is not connected — and the difference between those two sentences is the difference between a reader filing a bug and a reader running nkapp up.

[]the default emptyLabel
No data
Response time
PointValue (ms)
[null, undefined, NaN]three slots, no readings
No local bridge
Response time
PointValue (ms)
1No data
2No data
3No data

NkChartBars · NkChartDonut

The empty state is a decision each form makes in its own shape: the bars keep their grid, the donut keeps its empty track. Neither falls back to NkEmptyState, which is a full-width illustrated block sized for a view and cannot fit inside a 160px plot in a dashboard grid.

bars · []
No data
Requests
BarValue (req/min)
donut · [null, null]
No data
Disk allocation
SegmentValue (GiB)Share
1No data—
2No data—
Total0 GiB—

Every one of them still exposes its (empty) table, so a chart with no signal is never a nameless object in a screen reader's list of tables.

A hole breaks the line

A hole keeps its index and the stroke stops there. This is the one distinction on the page that matters most, because the two wrong answers both look fine. “We stopped collecting” is not “it was fine”, and it is not “it dropped to zero” either. All three charts below are the same component with the same props; the only variable is what the call site did with the two missing readings first.

NkChartSpline

three ways
dropped.filter(v => v !== null) · 10 slots
Response time
PointValue (ms)
1128 ms
2131 ms
3137 ms
4142 ms
5151 ms
6147 ms
7144 ms
8141 ms
9139 ms
10142 ms

Ten cells over the same width: the tape no longer lines up with the two below it. Nothing in the picture says so.

zeroedmap(v => v ?? 0) · 12 slots
Response time
PointValue (ms)
1128 ms
2131 ms
3137 ms
4142 ms
50 ms
60 ms
7151 ms
8147 ms
9144 ms
10141 ms
11139 ms
12142 ms

The indices survive and the data does not. Two invented readings of 0, and they drag the whole domain down with them.

as giventhe array, untouched · 12 slots
Response time
PointValue (ms)
1128 ms
2131 ms
3137 ms
4142 ms
5No data
6No data
7151 ms
8147 ms
9144 ms
10141 ms
11139 ms
12142 ms

Two runs, one gap, twelve slots. The component joins nothing it was not given.

The tapes are the slots as handed to the component, divided over one width. The misalignment of the first is the defect the chart cannot show on its own: a dropped hole is not a missing mark, it is a re-indexed series. A hole is not coerced to zero — that invents a reading the telemetry never took — and it is not dropped either, which is this.

Correct
The hole keeps its slot and the stroke stops. Twelve slots stay twelve, every later reading keeps its x position and its timestamp, and the gap is visibly a gap. The accessible table says No data for those two rows.
Regressed
Dropped: ten slots where there were twelve, so every reading after the hole slides left and the chart silently re-dates itself — the shape still looks plausible, which is what makes it dangerous. Zeroed: a cliff to the floor and back, which on a latency chart asserts a response time of zero milliseconds the service never achieved, and on an uptime chart asserts an outage that never happened.

Flat, at every value

A flat line is centred, and at every value it is flat at. A flat series makes max − min === 0, so the naive (v − min) / range is 0 / 0. It needs a fallback, and the fallback has to be symmetric — otherwise where flat sits depends on which value it is flat at, and a reader cannot tell “flat” from “slowly rising”. A flat line is also the normal state of a healthy gauge, so this is not an edge case.

NkChartSpline vs NkSparkline

flat ×3
flat at 7[7, 7, 7, 7]
NkChartSpline
Flat at 7
PointValue
17
27
37
47
NkSparkline
flat at 0.5[0.5, 0.5, 0.5, 0.5]
NkChartSpline
Flat at 0.5
PointValue
10.5
20.5
30.5
40.5
NkSparkline
flat at 0[0, 0, 0, 0]
NkChartSpline
Flat at 0
PointValue
10
20
30
40
NkSparkline

The mono line under each mark is measured, not asserted: the first y in the rendered d or points attribute, against that SVG's own viewBox height. Read the six of them as two rows — and the point of the panel now is that all six print the same number. They did not. The third sparkline put its line two pixels off the floor, which is also where a zeroed hole would put it (§5), so on a sparkline a healthy gauge reading zero and an outage drew the same picture. That is the reading this measurement exists to catch coming back; it is measured here rather than asserted precisely so that a regression shows up in the number under the mark and not only in a test.

Correct
A half-unit either side of the value, whatever the value is: v − 0.5 … v + 0.5. All three NkChartSpline rows below put the line across the vertical middle, so flat looks like flat at 7, at 0.5 and at 0 alike.
Regressed
Nudging min down by a whole 1 unless that would cross zero — minRaw − 1 > 0 ? minRaw − 1 : 0. That floors on the way down and never on the way up, so flat at 7 is centred, flat at 0.5 sits a third of the way up, and flat at 0 is pinned near the floor: three different pictures of the same fact. Measured y in a 40-unit box, before the fix: 20 / 26 / 38. This is what NkSparkline did until it was migrated onto chart-geometry; both rows of each pair now read 20, and chart-degenerate.test.tsx pins all three so the 26 and the 38 cannot come back.

One sample

This is the state of every chart on the first frame after a bridge reconnect, so it is not hypothetical. A single point makes the x step i / (n − 1) a division by zero, and the answer is not “render nothing”: it is a dot at x = 0.5, because a lone reading at x = 0 sits on the frame and reads as the end of a series that has been cropped.

NkChartSpline

data={[42]}
one reading[42]
One reading
PointValue (ms)
142 ms
one reading of zero[0]
One reading of zero
PointValue (ms)
10 ms
bars · one readingcentred in its own full-width band
One reading
BarValue (req/min)
142 req/min
Correct
One ringed dot, centred, with no line stretched across the plot. The linecap="round" zero-length subpath is specified to render as a dot, so the mark costs no special case.
Regressed
A division by zero in the x step, which puts NaN in the d attribute, which SVG renders as nothing at all — and an empty plot with a visible grid is indistinguishable from a layout bug.

NkSparkline

same array
one reading[42]
one reading — a centred dot, not an empty box
two readings[42, 44] — the threshold
two readings — the threshold is crossed
Correct
Whatever a component decides to draw for one reading, it has to draw something — or say that it has nothing, where the reader is looking.
Regressed
if (!data || data.length < 2) return null — no element at all, so the surrounding layout collapses and the only signal is the absence. That is what NkSparkline did before it moved onto chart-geometry; the stage below now draws a dot, centred at x 60 of the 120-unit viewBox by xAt's count ≤ 1 → 0.5 rather than pinned to the frame. It is a zero-length subpath (M x y L x y) painted by stroke-linecap="round", which is load-bearing and not a flourish: under the default butt cap the same path renders nothing and this defect comes straight back.

One dropped reading

Math.max(...data) with a single NaN anywhere in the array returns NaN. Every coordinate derived from it is then NaN, the path reads "M NaN NaN", and SVG's error handling for an unparseable path is to render nothing. Five good readings erased by one bad one.
That is why the whole of the diagnosis a team used to get was two console lines — <path> attribute d: Expected number and <polyline> attribute points: Expected number, both from NkSparkline, which is the signal this page was built to make visible. Nothing throws, nothing rejects, no error reporter fires, React re-renders happily and every test that asserts the component rendered still passes. A browser log line nobody is looking at is not a failure signal.
Both specimens below now partition the input before any arithmetic, so neither should produce either line: readSeries is shared, and chart-degenerate.test.tsx asserts of this exact array that no d contains NaN and that the result is two runs of five plotted points. The console on this page is therefore expected to be clean — that is read off the suite and the source, not off a browser, so a reader who opens the console is checking something this caption has not.

NkChartSpline vs NkSparkline

one NaN
NkChartSpline
Response time with a dropped reading
PointValue (ms)
1128 ms
2131 ms
3No data
4142 ms
5139 ms
6141 ms

Two runs, a gap at slot 3, six slots. The NaN is shown as a hole in the tape because that is what the component made of it.

NkSparkline
the same six readings, one of them NaN

Two runs with a gap at slot 3, the same decision as the chart beside it, because it is now literally the same readSeries. Before that, the element was in the DOM and the SVG had a width and there was simply no mark — and no error anywhere a team would see to explain why.

Correct
Number.isFinite — not !isNaN — partitions the input before any arithmetic, so the NaN becomes a hole and the other five readings plot normally. Infinity is a hole for the same reason: a span of Infinity makes every normalised value 0 and collapses the chart onto the baseline, which renders, and is wrong, which is worse than rendering nothing. A last-resort guard refuses to emit a d string containing a non-finite token at all; it should never fire, and the suite asserts that it never does.
Regressed
const maxRaw = Math.max(...data), unguarded: NaN propagates through max, through range and therefore through every y, so the mark is empty from an array whose five other readings are perfectly good. That was NkSparkline's first defect; it reads its scale from readSeries now, so the second row below draws two runs with a gap at slot 3 — the same shape as the first.

Zero, idle, missing

Three facts, three marks. A measured zero is a reading. A day with no deploys is a reading. A day the collector was down for is not. Collapsing any two of the three invents data — a quiet fortnight out of an outage, or an outage out of a quiet weekend — so each gets its own mark.

NkChartBars

dot ≠ missing

Both ends of a column are round-capped, which is what makes these pills rather than tabs — and it is also what makes the degenerate case honest. A reading of exactly zero is a zero-length subpath, which renders as a single round cap: a dot on the baseline. A missing reading draws no mark at all, and its band keeps its width. “Measured, and it was nothing” and “no measurement” therefore look different.

Deploys this week
BarValue (deploys)
Mon4 deploys
Tue0 deploys
Wed6 deploys
ThuNo data
Fri3 deploys

Tuesday is the dot. Thursday is the empty band — hover it and there is no readout, because there is no reading. Both are in the table: 0 and No data.

NkChartHeatmap

veil · ink · dashed

The same three facts as three cell treatments. Idle is a veil — the surface showing through, so a quiet month reads as empty rather than as dim. Active is the ink in four alpha steps, and the lowest active step is never the idle colour: one deploy on a scale topping out at 400 would otherwise round to “nothing happened” and disappear. No reading is a dashed outline with no fill.

Deploys, last fortnight
DayValue (deploys)
Oct 12, 20264 deploys
Oct 13, 202611 deploys
Oct 14, 20267 deploys
Oct 15, 20262 deploys
Oct 16, 20265 deploys
Oct 17, 20260 deploys
Oct 18, 20260 deploys
Oct 19, 20269 deploys
Oct 20, 202614 deploys
Oct 21, 2026No data
Oct 22, 20263 deploys
Oct 23, 20266 deploys
Oct 24, 20260 deploys
Oct 25, 20260 deploys

Two idle weekends, one dashed day. A negative count has no intensity, so a negative reading is drawn idle and its real value is kept in the table rather than invented into a bucket.

NkChartDonut

total 0

An empty volume group — every allocation zero — emits no arc, and the component draws the empty track with a centred total of 0. “Nothing allocated” is a reading, and it has to look different from a card that failed to render.

all zero[0, 0, 0]
Disk allocation
SegmentValue (GiB)Share
pgdata0 GiB—
silo0 GiB—
uploads0 GiB—
Total0 GiB100%
one non-zero parta closed ring, not a vanished arc
Disk allocation
SegmentValue (GiB)Share
pgdata184 GiB100.0%
Total184 GiB100%

The single part is a <circle> and not an arc, because an arc of exactly 2π has identical start and end points and SVG draws nothing between two coincident points. A zero-value part among non-zero ones gets no mark either: a round-capped zero-length arc would paint a dot on the ring that reads as a small allocation rather than as none.

The outlier

It is spanned, not rescaled. One reading three orders of magnitude above the rest is a real telemetry shape, and there is no honest automatic answer to it. A log scale nothing announced would misstate every other value on the chart; dropping the outlier would hide the only interesting thing in the data. So the component spans it — the small readings become short marks, which is true — and a caller who would rather clip says so explicitly.

NkChartBars

spanned

Four services, one of them logging 9 000 req/min. The other three are dots on the baseline, and a dot is the truthful mark for 4 against 9 000. Their values are still reachable: hover each band, or read the table.

Requests by service
BarValue (req/min)
auth4 req/min
events6 req/min
logs9,000 req/min
mail3 req/min

NkChartBars · domain

escape hatch

domain={[0, 20]} pins the value axis, so the three small services are legible and logs paints at the top edge — clipped, by the caller's own decision, rather than by a heuristic. The scale clamps rather than overflowing, so no mark is ever drawn outside the plot.
domain is the one axis knob NkChartBars exposes. There is no baseline prop, because a bar whose axis does not start at zero lies about every ratio on it — clipping is a different request, and an explicit one.

Requests by service, clipped at 20
BarValue (req/min)
auth4 req/min
events6 req/min
logs9,000 req/min
mail3 req/min

NkChartHeatmap · scaleMax

bucketed

A heatmap has the same shape of problem one step further on: with one 4 000-deploy day, four intensity buckets collapse onto the first and every normal day looks identical. scaleMax pins the top of the intensity scale, which is the answer — and the lowest active bucket is never the idle colour, so a one-deploy day never disappears into “nothing happened” whichever scale is in force.

auto · one huge day
Deploys with one 4000-deploy day
DayValue (deploys)
Oct 12, 20264 deploys
Oct 13, 202611 deploys
Oct 14, 20267 deploys
Oct 15, 20262 deploys
Oct 16, 20265 deploys
Oct 17, 20260 deploys
Oct 18, 20260 deploys
Oct 19, 20269 deploys
Oct 20, 202614 deploys
Oct 21, 2026No data
Oct 22, 20263 deploys
Oct 23, 20266 deploys
Oct 24, 20260 deploys
Oct 25, 20264,000 deploys
scaleMax={14}
Deploys, intensity pinned at 14
DayValue (deploys)
Oct 12, 20264 deploys
Oct 13, 202611 deploys
Oct 14, 20267 deploys
Oct 15, 20262 deploys
Oct 16, 20265 deploys
Oct 17, 20260 deploys
Oct 18, 20260 deploys
Oct 19, 20269 deploys
Oct 20, 202614 deploys
Oct 21, 2026No data
Oct 22, 20263 deploys
Oct 23, 20266 deploys
Oct 24, 20260 deploys
Oct 25, 20264,000 deploys

What the suite does

A bench that claims coverage without stating its boundary is doing the thing this page exists to argue against, so here is the boundary. So: the page renders all 15 shapes through NkChartSpline (§4) and examines 12 of them against a second component or a wrong answer. The suite renders 15 shapes × 6 components and asserts something the page cannot: that no rendered element anywhere carries a non-finite number in any attribute that could hold a coordinate.

chart-degenerate.test.tsx

15 shapes
Each degenerate shape, its input, and where this page examines it
ShapeInputExamined on this page
empty[]Nothing to plot
one hole[null]Nothing to plot
all holes[null, undefined, NaN]Nothing to plot
one reading[42]One sample
one reading of zero[0]One sample
flat[7, 7, 7, 7]Flat, at every value
flat at zero[0, 0, 0]Flat, at every value
flat at a fraction[0.5, 0.5, 0.5]Flat, at every value
hole in the middle[1, NaN, 3]A hole breaks the line
hole at both ends[null, 2, 3, null]A hole breaks the line
infinity[1, Infinity, 3]One dropped reading
negative[-5, 0, 5]§4 only — the rest of the family is the suite's
all negative[-9, -4, -6]§4 only — the rest of the family is the suite's
three orders of magnitude[1, 1, 9000]The outlier
long[0, 1, 2, …, 5]§4 only — the rest of the family is the suite's

The shape names and arrays in src/components/charts/degenerate.ts are the one transcription on this page, from modules/nk-lib/src/ui/chart-degenerate.test.tsx:26. A test file is not an importable module from an app, so there is no live source to read instead — which means this list can drift, and the count in the header above is printed so that a drift shows up as two different numbers rather than as a quietly incomplete gallery. Everything else here is derived: each input string is formatted from the array beside it, and each link is the section that array is handed to.