React Pareto Chart

Most of the damage comes from a few of the causes. A Pareto chart ranks them, overlays the cumulative share, and marks where the "vital few" end — turning a defect table into a decision about where the next engineer-week goes.

Wafer scrap by failure mode — last 30 days

4 of 9 categories account for 85% of the total.

1,124 dies
0%25%50%75%100%0412Particle contamin…Overlay misregist…CMP dishingEtch depth OOSPhotoresist defectMetal voidEdge beadHandling scratchMisc / uncategori…
#CategoryCountShareCumulative
1Particle contaminationLitho track, bay 341236.7%36.7%
2Overlay misregistrationScanner 2 drift28725.5%62.2%
3CMP dishing16414.6%76.8%
4Etch depth OOS988.7%85.5%
5Photoresist defect615.4%90.9%
6Metal void443.9%94.8%
7Edge bead292.6%97.4%
8Handling scratch181.6%99.0%
9Misc / uncategorized111.0%100.0%

Installation

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

Props

PropTypeDescription
itemsParetoItem[]{ label, value, note? } — any order
titlestringChart heading
unitstringAppended to the total, e.g. " dies"
thresholdnumberCumulative share defining the vital few (default 0.8)
showTablebooleanRanked table under the chart (default true)
heightnumberSVG height (default 280)

The component sorts, computes each category's share, and accumulates the running total — pass items in whatever order you have them. Bars inside the threshold are drawn in the primary colour; the trivial many recede to muted, and the table underlines the cutoff row.

Reading it, and its limits

The bars use the left axis (counts); the line uses the right axis (cumulative %). Where the line crosses the dashed threshold is your answer: everything to the left is where the leverage is.

Two honest caveats worth knowing before you present one:

  • Pareto ranks by frequency, not by cost or severity. The most common defect is not always the most expensive one. If a rare failure scraps a whole lot, weight value by cost rather than count — the component does not know the difference, and the label should say which you used.
  • A flat Pareto is a real result. If no small set of categories dominates, the 80/20 framing does not apply and forcing it hides that. The header states the actual share the vital few reach, so a genuinely even distribution reads as one rather than being dressed up.

New components every week

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