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

Pareto ​

Bars from high to low, with a line for the running share

Finds the few causes that make most of a problem. The bars go from the biggest cause to the smallest, and the line shows the share of the total up to each bar. For bars in your own order, use the bar chart.

Basic
Why listeners stopped early
ItemValueRunning share
Long intro12831%
Ads9654%
Low sound7472%
Off topic4182%
Echo2989%
Too fast2295%
Music1398%
Other9100%
  • data is a list of items, each with a label and a value. The chart puts them in order from high to low and leaves out values of zero or less.
  • The left axis is the value of a bar. The right axis is the running share, from 0% to 100%.
  • cut is the share that marks "the few" (default 0.8, for the 80/20 rule). A dashed line shows it. The bars up to the first bar that reaches it are in full color, and the other bars are lighter.
  • color sets the color of the bars, and format sets the text of a value. height sets the height in pixels (default 260).
  • For screen readers, the chart is a table with the value and the running share of each item. label names the table. Change the column names with labels or a label pack: item, value, and running.

Usage ​

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

API ​

Props

NameTypeDefaultDescription
data*BlessParetoItem[]—
cutnumber0.8the share that marks "the few": a dashed line, and the bars up to it are in full color
colorstring"chart-1"
heightnumber260
format((v: number) => string)—text for one value, for example `(v) => v + " min"`
labelstring"Chart"names the chart and its table for screen readers
labelsPartial<{ item: string; value: string; running: string; }>—

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