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
| Item | Value | Running share |
|---|---|---|
| Long intro | 128 | 31% |
| Ads | 96 | 54% |
| Low sound | 74 | 72% |
| Off topic | 41 | 82% |
| Echo | 29 | 89% |
| Too fast | 22 | 95% |
| Music | 13 | 98% |
| Other | 9 | 100% |
datais a list of items, each with alabeland avalue. 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%.
cutis 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.colorsets the color of the bars, andformatsets the text of a value.heightsets the height in pixels (default 260).- For screen readers, the chart is a table with the value and the running share of each item.
labelnames the table. Change the column names withlabelsor a label pack:item,value, andrunning.
Usage
ts
import { BlessPareto } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
data* | BlessParetoItem[] | — | |
cut | number | 0.8 | the share that marks "the few": a dashed line, and the bars up to it are in full color |
color | string | "chart-1" | |
height | number | 260 | |
format | ((v: number) => string) | — | text for one value, for example `(v) => v + " min"` |
label | string | "Chart" | names the chart and its table for screen readers |
labels | Partial<{ item: string; value: string; running: string; }> | — |