Line chart
Trends over time for one to four series, with gaps for missing data and marked forecasts.
A process over time against its own natural limits, marking the points that are real signals.
A control chart separates signal from noise. Every process wobbles; the question is whether this week's number is part of the usual wobble or a real change. The chart draws the values over time with a centre line and natural process limits, and marks the points that are signals.
It is an XmR (individuals) chart: the limits are three sigma from the mean, with sigma estimated from the average moving range, the standard method that doesn't need normal data. Three kinds of signal are marked: a point outside the limits, a run of eight points on one side of the centre, and a steady trend of six points rising or falling. Set a baseline to compute the limits from the period before a change and judge the points after it against them, and a floor so the lower limit never goes below zero. Choose the run-chart form for a median line without limits.
With favorable set, signals in the good direction are coloured good.
Control chart is a Pro chart.
Installation is part of Pro
Get Pro to install it with your access key and the shadcn CLI, and use it in unlimited projects.
Unlock with ProUsage examples are part of Pro
Every example on this page comes with its code in Pro. The props and data shape below are public.
Unlock with ProOne row per measurement in time order with an x key and a numeric value key.
[{ week: "W1", hours: 7.8 }, { week: "W2", hours: 8.4 }, ...]Missing values are null. Invalid values make the chart say what’s wrong instead of drawing a misleading picture. How charts handle bad data
Every chart also accepts the shared frame props: title, subtitle, source, height, mode, toolbar. Common API
export interface ControlChartProps extends FrameProps {
/** Rows to draw, one measurement per row, in time order. See the Data section for the shape. */
data: Row[];
/** Key of the x value (date, week, batch). */
x: string;
/** Key of the measured value. */
value: string;
/** "xmr" (default): mean and natural process limits (±3σ from the average moving range). "run": median only, a run chart. */
kind?: "xmr" | "run";
/** Compute the centre line and limits from the first N points only, then hold them, to judge later points against a baseline. Default: all points. */
baseline?: number;
/** Lowest possible value, e.g. 0 for counts and durations. The lower limit is not drawn below it. */
floor?: number;
/** Which direction is good, to colour signals. Default "none": signals are marked but not judged. */
favorable?: Favorable;
/** Number format for values: "currency", "percent", "integer", "compact" or a format object. */
format?: FormatInput;
}Trends over time for one to four series, with gaps for missing data and marked forecasts.
Actuals solid, forecast dashed from the last actual, plan line and uncertainty band.
Every observation visible by group, with the median marked.