SPC Charts
Statistical Process Control — plot variable-characteristic measurements against dynamically calculated control limits, detect Nelson rule violations, and quantify process capability with Cp and Cpk.
Overview
Statistical Process Control (SPC) uses statistical methods to monitor a manufacturing process over time and detect when it is drifting out of control — before it produces defective parts. The SPC Charts screen in TotalApp plots all variable measurements recorded for a selected characteristic, draws control limits (UCL/LCL), and flags out-of-control signals using the Nelson Rules. The Cpk capability index tells you whether the process is inherently capable of meeting the specification, even when it is statistically stable.
Canvas Control Chart
A high-performance HTML5 Canvas chart plots every measurement as a coloured dot — green for in-spec, red for out-of-spec — connected by a blue line. UCL, LCL, and center line are drawn as dashed reference lines.
Nelson Rule Detection
Four Nelson rules are evaluated automatically. Violations are listed in a sidebar panel and highlighted in the chart. Each violation is linked to the checklist and lot that triggered it.
Cpk Capability Analysis
Cp and Cpk are calculated from the measurement data and shown as large stat cards. The capability label (Capable / Marginal / Not Capable) gives an immediate process health verdict.
Characteristic Selector
A dropdown lists every variable characteristic from all active inspection plans. Select a characteristic to instantly reload the chart and recalculate all statistics for that dimension.
Reading the Control Chart
| Element | Colour | Meaning |
|---|---|---|
| UCL (Upper Control Limit) | Red dashed line | Process average + 3 sigma. Points above this are statistically unusual. |
| LCL (Lower Control Limit) | Red dashed line | Process average − 3 sigma. |
| Center Line (X̄) | Green dashed line | Grand mean of all measurements. |
| Green dot | Green | Measurement passed specification limits. All in-spec measurements appear green regardless of control limit position. |
| Red dot | Red | Measurement failed specification limits. All out-of-spec measurements appear red regardless of control limit position. |
| X-axis labels | — | Last 6 characters of the lot number for each measurement point. |
Pass/Fail vs Control Limit Coloring
Point colors reflect specification compliance, not statistical control. A green point means the measurement is within spec; a red point means it failed spec. A point can be green while still triggering a Nelson rule violation (statistically unusual but within spec), or red while inside the control limits (failed spec but statistically common). Violations are shown separately in the Violations sidebar.
Control Limits vs Specification Limits
Control limits (UCL/LCL) are based on process variation — they show what the process is doing. Specification limits (Min/Max from the inspection plan) show what the process needs to do. A process can be in control but out of spec (Cpk < 1), or out of control but still within spec. SPC watches both simultaneously.
Nelson Rules
TotalApp monitors four Nelson out-of-control rules. When any rule is violated, a red violation entry appears in the right-side panel and the violation is stored in the SPC violations log.
False Positives
Nelson rules are probabilistic. Rules 2–4 may occasionally flag patterns in truly random data. Always investigate the physical process before initiating a machine adjustment — over-correction (tampering) can increase process variation.
Process Capability — Cp and Cpk
Capability indices compare the width of the specification range to the natural variation of the process. At least 4 measurement data points are required for the calculation to appear.
| Index | Formula (simplified) | What It Measures |
|---|---|---|
| Cp | (USL − LSL) / (6σ) | Process spread relative to spec width — assumes the process is perfectly centred |
| Cpk | min[(USL − X̄), (X̄ − LSL)] / (3σ) | Worst-case proximity to either limit — accounts for process centering |
Capability Labels
| Cpk Value | Label | Interpretation |
|---|---|---|
| ≥ 1.33 | Capable | Process is well within spec with a comfortable safety margin. Industry benchmark for most manufactured parts. |
| 1.00 – 1.33 | Marginal | Process meets spec but has little margin. Any drift will cause rejects. Improvement recommended. |
| < 1.00 | Not Capable | Process is inherently producing some out-of-spec parts. Root cause investigation and process improvement required. |
Cpk requires a stable process
A meaningful Cpk value can only be calculated when the process is statistically in control (no Nelson rule violations). If the chart shows out-of-control signals, resolve them first — a Cpk from an unstable process is misleading.
Violations Sidebar
The right-side panel lists all recorded violations across all characteristics — not just the one currently selected in the chart. Click any violation row to switch the chart to that characteristic and highlight the offending data point. Each violation shows:
- The Nelson Rule number that was triggered.
- The rule description.
- The date the violation was detected.
The bottom of the sidebar contains a Nelson Rules Reference card as a quick reminder of what each numbered rule means — no need to look up the standard while working.
AI Assistant
SPC Charts includes a right-edge AI Assistant panel that reviews the currently selected characteristic's control chart summary — data points, UCL/LCL/center line, Cp, Cpk, capability label, and any Nelson Rule violations — and answers natural-language questions about it.
Capability Interpretation
Explains what a given Cp/Cpk value means for process capability and whether it meets typical industry thresholds.
Violation Triage
Explains what a specific Nelson Rule violation indicates about the process and suggests likely investigation steps.
Trend Summary
Summarizes whether the process looks stable, trending, or shifting.
Prioritization
When multiple characteristics have violations, helps decide which to investigate first based on severity and violation count.
Save Assistant Answers as Reports
Any assistant response can be saved directly to My Reports with one click, so a capability interpretation or violation triage doesn't have to be re-generated later.
Frequently Asked Questions
qualityManagementService.ts service layer.