Skip to content
Calm motion: animations on this site only fade, with no movement

Control chart ​

Measured values over time with the center line and the control limits (SPC)

Watches a process for change, in SPC (statistical process control). A point outside the control limits says that something changed and needs a look. The chart follows the control chart of Walter A. Shewhart.

Basic
2 points are out of control.Mean 120.01 mm · Upper limit 120.15 mm · Lower limit 119.87 mm
Control chart
PointValueState
07:30120.02 mmin control
08:00119.98 mmin control
08:30120.05 mmin control
09:00120.01 mmin control
09:30119.96 mmin control
10:00120.03 mmin control
10:30120 mmin control
11:00120.07 mmin control
11:30120.19 mmout of control
12:00120.04 mmin control
12:30119.99 mmin control
13:00120.02 mmin control
13:30119.81 mmout of control
14:00120.01 mmin control
  • values is the list of measures in time order. points gives a label for each, such as the time.
  • center, ucl (upper control limit), and lcl (lower control limit) set the lines. Without them, the chart takes the mean of the values and the mean ± 3 standard deviations.
  • The limits are dashed red lines, and the mean is a solid line. A point out of control is a red diamond, and a point in control is a circle.
  • The caption counts the points out of control and gives the three lines. A hidden table lists each point and its state for screen readers.
  • unit adds the unit to the numbers. height sets the height in pixels (default 240). The chart takes the width of its box.
  • Change the words with labels or a label pack. The API table lists the keys.

The controlLimits function works out the lines. It is exported for your own views.

Usage ​

ts
import { BlessControlChart } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
values*number[]—the measures in time order
pointsstring[]—a label for each point, for example the time or the sample number
uclnumber—fixed limits; without them, the chart works them out from the values
lclnumber—
centernumber—
unitstring—
heightnumber240
localestring"en"
labelsPartial<{ title: string; center: string; ucl: string; lcl: string; inControl: string; out: (count: number) => string; point: string; value: string; state: string; ok: string; bad: string; }>—

Released under the MIT License. Character names and artwork belong to their owners.