React Capability Histogram
Where the control chart asks whether a process is stable, this asks whether it is capable — whether its natural spread actually fits inside the spec window. It bins the sample, draws the limits, fits a normal curve, and computes Cp and Cpk.
Gate oxide thickness
n 220 · μ 4.623 nm · σ 0.070 nm
- Cp
- 1.42
- Cpk
- 0.84
- Out of spec
- 1
- Spec window
- 0.600
Spread only
Spread and centring
0.5% of sample
4.200 – 4.800 nm
Installation
Props
| Prop | Type | Description |
|---|---|---|
| values | number[] | The raw sample |
| usl lsl | number | Upper / lower spec limits |
| target | number | Nominal, drawn separately from the limits |
| bins | number | Histogram bin count (default 18) |
| unit | string | Appended to statistics |
| showCurve | boolean | Overlay the fitted normal (default true) |
| height | number | SVG height (default 260) |
Cp says the spread fits; Cpk says it fits where it is
This is the distinction the component is built to make visible:
- Cp = (USL − LSL) / 6σ — could the distribution fit the window if it were perfectly centred?
- Cpk = min((USL − μ) / 3σ, (μ − LSL) / 3σ) — does it fit given where the mean actually sits?
The demo has Cp ≈ 1.42 with Cpk ≈ 0.84: the spread is comfortably tight, but the process runs high, so it eats into the upper limit anyway. That gap is the whole reason both indices exist — a healthy Cp with a poor Cpk means recentre, not reduce variation, and those are very different corrective actions. The convention baked into the status pill: Cpk ≥ 1.33 capable, ≥ 1.0 marginal, below that not capable.
Deterministic demo data
The sample is generated from a seeded Box–Muller draw, never Math.random(). In a statically exported app, random data computed at render time produces different numbers on the server and the client — a guaranteed hydration mismatch. If you feed this component synthetic data, seed it; if you feed it real measurements, you are fine.
New components every week
Get the week's new Kelvin UI components and templates in one short email. No spam, unsubscribe anytime.