React Control Chart

Is my process stable? — a different question from is this part in spec?, and the one that catches trouble before scrap does. This is an individuals chart with shaded sigma zones and automatic Western Electric rule detection, so a drift is flagged while it is still a drift.

Etch depth by lot

249 nm · σ 1.26 nm · UCL 253 · LCL 245

9 out-of-control points
USLLSLUCLLCL242249256144444444L-101L-104L-107L-110L-113L-116L-119L-122L-125
  • 1Point beyond 3σ
  • 48 consecutive on one side of centre

Installation

npx shadcn@latest add "https://kelvinui.com/registry/control-chart.json"

Props

PropTypeDescription
dataControlPoint[]{ label, value } in sample order
titlestringChart heading
unitstringAppended to statistics, e.g. " nm"
centerLinenumberOverrides the computed process mean
sigmanumberOverrides sigma from the average moving range
usl lslnumberSpec limits — drawn distinctly from control limits
rulesbooleanWestern Electric detection (default true)
heightSVG height (default )

Sigma from the moving range, not the sample

The one subtlety that separates a real control chart from a line graph with lines on it: sigma is estimated from the average moving range (mR̄ / d₂, with d₂ = 1.128 for consecutive pairs), not from the sample standard deviation.

If you used the sample standard deviation, a genuine special cause — the exact thing the chart exists to detect — would inflate the estimate and pull the control limits out to swallow itself. The moving-range estimate reflects only point-to-point variation, so an out-of-control run still lands outside the limits.

The rules

Point markers are labelled with every rule they trip:

RuleSignal
1One point beyond 3σ
22 of 3 consecutive beyond 2σ, same side
34 of 5 consecutive beyond 1σ, same side
48 consecutive on one side of the centre line

The demo shows both classic failure modes: a single excursion at L-113 (rule 1) and a slow upward drift over the final lots (rule 4) that never breaches a limit but is unmistakably not random. Spec limits (usl/lsl) are drawn in a distinct dashed style, because "in control" and "in spec" are independent — a process can be perfectly stable and still centred too close to a limit.

New components every week

Get the week's new Kelvin UI components and templates in one short email. No spam, unsubscribe anytime.