Pareto chart reference
Contents: Use cases, Chart IDs, Minimal spec, Data, Options, Annotations, Sizing, Fixtures, Not for.
Sorted columns plus a derived cumulative curve whose 100% is the grand total; the vital few reaching a stated threshold are highlighted, and a flat distribution says so instead of implying concentration. Type pareto. Aliases: pareto-chart.
Use cases
- Few causes, most volume
- Customer concentration
- Defect causes by count
Chart IDs
One form; its chart ID is pareto.
Minimal spec
{
"type": "pareto",
"data": {
"items": [
{ "id": "billing", "label": "Billing", "value": 80 },
{ "id": "delivery", "label": "Delivery", "value": 15 },
{ "id": "other", "label": "Other", "value": 5 }
]
},
"options": { "unit": "cases", "title": "Billing accounts for 80% of cases", "source": "Illustrative data" }
}Data
| Path | Type | Required | Meaning |
|---|---|---|---|
| items | array | yes | Category contributions ranked by descending value to derive cumulative shares. |
| items[].id | string | yes | Nonempty stable identifier used to match data, labels and annotation anchors. |
| items[].label | string | Visible category name; defaults to the item id. | |
| items[].date | string | Optional ISO period date for CAGR between explicitly named items. Does not change the descending value order. | |
| items[].value | number | null | yes | Count or amount. Shares are DERIVED: a percent cell, a null, a negative or a non-finite value is refused with its own error code. |
| items[].rest | boolean | An authored aggregate remainder. Kept last and included in the cumulative denominator, excluded from the vital-few ranking. At most one remainder. A tail that topN folds joins it: one remainder column, with the authored label and no member count. | |
| items[].fill | string | Authored CSS color for this item; preserved across theme changes. |
Options
| Path | Type | Values | Default | Meaning |
|---|---|---|---|---|
| categoryLabels | string | 'axis', 'staircase' | 'staircase' names each cause over the lower columns; it needs cumulative: false, as the curve climbs through that space. Default 'axis'. | |
| topN | object | integer | Keep the n largest causes. rest: false hides only the remainder column (the folded tail, or the authored rest that holds it); its labeled curve point and the full-population total remain. A positive integer n means { n }. | ||
| threshold | number | false | false (or another value of its type) | 80 | Cumulative-share reference, default 80. A convention to choose, not a property of the data: 80 is the classic Pareto rule, 90 or 95 asks which causes carry nearly all of the total. The dashed rule is drawn at the value, and the highlighted vital few and their key follow it. false draws the curve with no reference and no vital-few split: every column in one color, no key. |
| cumulative | boolean | true | Draw the derived cumulative curve. Default true; false also withholds the threshold rule. | |
| axisTitles | object | Title over the left value axis, which is drawn by default. Drawn when authored, or as 'Measure, unit' under a theme that derives value-axis titles. | ||
| axisTitles.primary | string | Title over the left value axis. | ||
| totalScale | boolean | Scale the left axis to the total: 100% on the right sits level with the total on the left, so the curve starts at the top of the first column and each column reads against the curve. Default: on when a vital few reaches the threshold and no valueAxis.min or max is set; off for a flat distribution, whose columns would shrink to a sliver. false caps the column axis on the columns alone and the curve rides its own 0-100% scale. | ||
| methodNote | boolean | false | Footnotes stating the derivation and the vital-few set. Default false: the reader gets the exhibit, not a method statement. |
Plus the shared options. This type does not accept detailFields, valueAxis.tickStep, valueAxis.log, valueAxis.reverse, valueAxis.break, highlight, hatchStrength, rounding. This type ignores animate, debug, rowLabels, categoryAxis, secondaryAxis, sort with an option-ignored warning.
Annotations
An annotation anchor is a category or item id string, or an object with categoryId plus optional seriesId, segmentId and edge (start, end, total); pointId addresses a scatter point. Category anchors, including from/to, take category ids, not category labels.
| Kind | Purpose | Required | Anchors | Optional fields | Notes |
|---|---|---|---|---|---|
| note | Places authored text at an anchored data element through collision avoidance, with an optional icon or status chip. | at, text | at: AnchorRef | ||
| callout | Places authored free text at an anchored data element, routing a leader when displaced and honoring the preferred side. | at, text | at: AnchorRef | preferSide: left | right | above | below. Side the solver tries first; the label keeps a leader when it moves. headline: string. A bold first line over the text, which then prints in plain type; ${value} in it prints the anchored value from the data. Example: "headline": "${value}", "text": "Peak in handheld-loom demand" prints 153 in bold over the words. arrow: boolean, default false. An arrow from the text to the anchored point, in the arrow standard of theme marks.arrow: the text stands far enough out for a 24 px shaft, level with the point right or left of it, or over or under it, where there is room. With no such seat it draws without the arrow and warns callout-arrow-no-room. Not with icon or status. Example: "arrow": true. | |
| cagr | Draws a growth arrow between two anchored points and computes the compound annual growth rate from their values and ISO-date span. | from: AnchorRef (optional); to: AnchorRef (optional) | suffix: string, default 'p.a.'. Text after the rate. period: boolean. Print the period before the rate from the anchors' category labels, '2014–2019: +5.8% p.a.'. Default true when the chart carries two or more CAGRs, so nested brackets are told apart by their text, false otherwise. An arrow's ends show its span, so an arrow prints the rate alone unless period is true. shape: bracket | arrow, default bracket. arrow draws one straight arrow over the marks with the rate in an oval on it, lifted until it clears them. Where no straight line clears the chart, the span is too short for the oval, a stack's inner layer is the anchor or the chart lays comparisons out itself, it draws the bracket and warns cagr-arrow-no-room. | Omitted endpoints span the first to the last category, or the first to the last total on a waterfall. Resolved endpoints need a positive date interval from ISO dates or year-bearing labels and a positive start value; an end of zero reads -100%, and a start at or below zero or a negative end omits the rate and warns cagr-undefined. On a continuous time axis the years are the exact span between the two readings. An anchor on one series of several (seriesId, or a category of an unstacked line, which reads the first drawn series; on a stack a category reads the stack total) names that series in the label, "Product B +10.1% p.a.", and the arm runs from that series' segment or point. In text, ${value} prints the rate with its suffix, so "CAGR 2014–2019: ${value}" keeps the computed number. | |
| diff | Draws a level-difference arrow between two anchors and computes either percent change or their signed value difference. | from, to | from: AnchorRef; to: AnchorRef | mode: relative | absolute | reversed | both, default relative. relative prints the percent change from 'from' to 'to', reversed the change from 'to' to 'from', absolute the value difference, both the value difference with the percent change beside it. | Mode defaults to relative. Relative and reversed changes need a nonzero base; negative bases use its absolute magnitude and emit a warning. Absolute mode reports the raw value difference. A hidden label removes its arm. |
| delta | Computes the signed difference between an anchored value and another anchor or literal, then places a collision-managed label at the first anchor. | at, vs | at: AnchorRef; vs: AnchorRef | number | mode: absolute | relative | both, default absolute. absolute prints at minus vs, relative the percent change from vs to at, both the two as '+149 (+36%)'. relative and both need a nonzero vs. | |
| text | Places authored text at a point through the label solver: on the point, or above, below, right or left of it. The text prints as written. | at, text | at: AnchorRef | { categoryId, value } | A point is an anchor or { categoryId, value } with value in axis units. A value outside the plot, a chart with no value scale or an anchor that does not resolve warns bad-anchor and draws nothing; the axis does not grow. The text prints as written, ${value} included. It takes id and priority, and no other field. | |
| line | Draws a straight line between two points or from a text annotation, in the ink and rule width of a bracket; a stretch that would cross text is cut. | from, to | from: AnchorRef | { categoryId, value } | { annotationId }; to: AnchorRef | { categoryId, value } | { annotationId } | dashed: boolean, default false. Draws the line in the dash of a reference line. | A point is an anchor or { categoryId, value } with value in axis units. A value outside the plot, a chart with no value scale or an anchor that does not resolve warns bad-anchor and draws nothing; the axis does not grow. An end { annotationId } names a text annotation: the line starts or ends at the nearest edge of that text, at every size, and is not drawn when the text is not. A { categoryId, value } end stands on the category's center. A stretch that would cross text is cut and warns draw-crosses-text. It takes dashed and id, and no other field. |
| arrow | Draws a straight arrow between two points or from a text annotation to a point, in the theme arrow look (marks.arrow); a stretch that would cross text is cut. | from, to | from: AnchorRef | { categoryId, value } | { annotationId }; to: AnchorRef | { categoryId, value } | { annotationId } | dashed: boolean, default false. Draws the shaft in the dash of a reference line. | A point is an anchor or { categoryId, value } with value in axis units. A value outside the plot, a chart with no value scale or an anchor that does not resolve warns bad-anchor and draws nothing; the axis does not grow. An end { annotationId } names a text annotation: the arrow starts or ends at the nearest edge of that text, at every size, and is not drawn when the text is not. A { categoryId, value } end stands on the category's center. A stretch that would cross text is cut and warns draw-crosses-text. It takes dashed and id, and no other field. |
| box | Draws an unfilled box with two points as opposite corners, wrapping whole category bands, in the ink and rule width of a bracket; text inside the box stays free. | from, to | from: AnchorRef | { categoryId, value }; to: AnchorRef | { categoryId, value } | dashed: boolean, default false. Draws the edges in the dash of a reference line. | A point is an anchor or { categoryId, value } with value in axis units. A value outside the plot, a chart with no value scale or an anchor that does not resolve warns bad-anchor and draws nothing; the axis does not grow. from and to are opposite corners, the box has no fill, and text inside it stays free. A { categoryId, value } corner spans that category's whole band, so the box wraps whole bars, values and markers; from and to on one category wrap that category. A stretch that would cross text is cut and warns draw-crosses-text. It takes dashed and id, and no other field. |
Sizing
Floor 280 × 270 px; fit fill. Below 270 px high, down to the compact floor of 280 × 180 px, the chart draws in compact mode; belowMinimum: 'refuse' refuses there instead.
Below the floor a render is refused with size-below-floor and the pixels it needs. measure returns the natural and comfortable size for a given spec; see Sizing in the manual.
Fixtures
| ID | Kind | Use case |
|---|---|---|
| period-growth-anchors | example | FY24 contributes twice FY21, equivalent to 26.0% annual growth |
| cause-differences | example | Billing exceeds delivery by 65 cases |
| defect-causes | example | Three of eight causes account for the first 80% of defects |
| curve-without-threshold | example | The cumulative curve with no threshold reference and no vital-few split |
| revenue-concentration | example | Five of 24 accounts carry 81% of revenue; the tail of 14 rides in one rest column |
| torture-pareto-flat | torture | Twelve equal items: no vital few, no highlight, and the exhibit says so |
| torture-pareto-spike | torture | One cause at 99.2%, a zero-count cause, and a 95% threshold |
| torture-long-labels | torture | Torture: long names at a generous size read whole, never cut |
| defect-causes-method-note | example | Defect causes with the derivation and the vital few stated |
| defect-causes-bars-only | example | Defect causes ranked without the cumulative curve and its threshold |
| authored-fill-key | torture | Cause keys use the authored bar colors |
| rest-curve-only | torture | A large tail stays in the curve without shrinking the named columns |
| authored-rest | torture | An authored aggregate remains last |
| staircase-labels | example | Staircase cause names over sorted columns, without the cumulative curve |
Not for
Negative contributions; pareto accumulates nonnegative parts of one total.