Price-volume-mix chart reference
Contents: Use cases, Chart IDs, Minimal spec, Data, Options, Annotations, Sizing, Fixtures, Not for.
Derives the price, volume, mix, new, and lost decomposition of a revenue change from per-item units and revenue, and proves it reconciles exactly. Type pvm. Aliases: price-volume-mix.
Use cases
- Revenue change by price, volume, mix
- New and lost business
- Price effect per product
Chart IDs
One form; its chart ID is pvm.
Minimal spec
{
"type": "pvm",
"data": {
"quantityUnit": "units",
"items": [
{
"id": "basic",
"label": "Basic",
"prior": { "qty": 100, "revenue": 1000 },
"current": { "qty": 120, "revenue": 1320 }
},
{
"id": "premium",
"label": "Premium",
"prior": { "qty": 50, "revenue": 1000 },
"current": { "qty": 60, "revenue": 1320 }
}
]
},
"options": {
"unit": "$",
"title": "Higher prices and quantities lift revenue by $640",
"source": "Illustrative data"
}
}Data
| Path | Type | Required | Meaning |
|---|---|---|---|
| priorLabel | string | Opening total-bar name; default Prior. | |
| currentLabel | string | Closing total-bar name; default Current. | |
| items | array | yes | Comparable items with prior and current quantities and revenues for the price/volume/mix decomposition. |
| items[].id | string | yes | Unique item identity binding prior and current decomposition inputs. |
| items[].label | string | Item name for the author. The bridge draws effect bars, not items, so no item name prints. | |
| items[].prior | object | yes | Base period. |
| items[].prior.qty | number | yes | Units sold in the period. Never negative; 0 only with revenue 0. |
| items[].prior.revenue | number | yes | Revenue for those units. Price is derived as revenue / qty. |
| items[].current | object | yes | Comparison period. |
| items[].current.qty | number | yes | Units sold in the period. Never negative; 0 only with revenue 0. |
| items[].current.revenue | number | yes | Revenue for those units. Price is derived as revenue / qty. |
| priorDate | string | ISO date of the common base period, attached to the prior total for CAGR. | |
| currentDate | string | ISO date of the common comparison period, attached to the current total. Effects do not represent elapsed time. | |
| quantityUnit | string | The common unit every item's qty is counted in ('licences', 'cases', 'seats'). The volume/mix split is a function of it — the same business counted in cases rather than units moves the Volume and Mix bars — so leaving it out warns and the exhibit says so. |
Options
| Path | Type | Values | Default | Meaning |
|---|---|---|---|---|
| labels | object | Which generated numbers print. labelDensity still thins them. | ||
| labels.point | false | false | false stops printing the values of the steps and totals. The bars, hover and records keep them. The net change has its own switch, netChange, and takes the seat of the closing value. | |
| interaction | string | 'in-price', 'separate' | 'in-price' | Where the price x volume interaction is booked: 'in-price' reads price at current volumes and absorbs it; 'separate' splits it into a Laspeyres price bar plus an explicit joint bar. |
| volumeMix | string | 'split', 'combined' | 'split' | 'split' (default) draws Volume and Mix separately; the boundary between them depends on the counting unit, which methodNote: true states on the exhibit. 'combined' draws one 'Volume & mix' bar and the decomposition is then unit-invariant. |
| methodNote | boolean | Default false. true adds the short convention ("volume and mix at prior prices") to the one footer line, which joins the coverage note ("Covers the 4 items in both periods") while items enter or leave the book; the coverage part prints regardless. Where Volume and Mix nearly cancel (their sum under a tenth of the larger) the convention and the counting unit print without it, since the split between them then carries the story. The long method notes are in derived, and join the notes list when notes is set. | ||
| netChange | boolean | true | Default true. Prints the net change from the opening to the closing total, absolute and in percent, in its sign color above the closing column. false leaves the closing column with its value only. | |
| columnOverrides | object | Horizontal bridge only: width in px of the name band (label) and the value band (value). A bridge that draws vertical warns option-ignored. It never changes the choice of the form. | ||
| columnOverrides.*.width | number | Track width in px. It beats the width the type would pick. |
Plus the shared options. This type does not accept detailFields, valueAxis.min, valueAxis.max, valueAxis.tickStep, valueAxis.includeZero, valueAxis.percent, valueAxis.log, valueAxis.reverse, hatchStrength, rounding. This type ignores animate, debug, rowLabels, categoryAxis, categoryLabels, secondaryAxis, sort, topN, legend, valueAxis.show, valueAxis.gridlines 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 |
|---|---|---|---|---|---|
| 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. | |
| 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. | |
| valueLine | Draws a reference line at an authored value or an engine-computed mean, with optional tolerance shading and attainment fill between the line and resolved actuals. | from: categoryId (optional); to: categoryId (optional) | value: number | 'mean', default mean. A number draws the line there; mean has the engine compute it. valueKind: 'fraction'. Multiply a numeric value and its tolerance by 100 before layout: 0.35 draws at 35%. Independent of data.valueKind. Omit it for values already in percent points; not valid with mean. label: string | false. Name plus value; ${value} sets its position. A number already in the name is kept once. false hides it. side: left | right, default right. Side of the plot the label sits on. tolerance: number | { low, high }. A number shades that distance on both sides of the line; low and high shade an authored corridor. On column, bar and dot the key names the band with its bounds, "Target range: 95 to 105"; without a key the band prints its bounds itself. | No anchor is required. Value defaults to mean. Scoped means are line-only: seriesId and paired from/to compute a primary-axis mean and limit its stroke to those bands; other types refuse scope fields for a mean. Numeric values cannot use scope fields except as a category clip with tolerance or attainment. A secondary-axis line needs an acknowledged secondary scale and an explicit numeric value. Optional tolerance shades a value-axis band; optional attainment fills between the line and resolved actuals. | |
| abs | Reads the anchored data value and places its formatted absolute value in a collision-managed label. | at | at: AnchorRef | ||
| 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 |
|---|---|---|
| fy-revenue-bridge | example | FY24→FY25 product revenue bridge (six products, one new, one discontinued) |
| segment-pvm-interaction-split | example | Regional bridge with the price x volume interaction shown separately |
| mix-dominates-sign-flip | torture | Torture: mix and volume are near-equal opposites, one quantity falls three orders of magnitude, and a line carries negative revenue |
| fy-revenue-combined-volume-mix | example | FY24 to FY25 revenue bridge with volume and mix combined |
| dated-revenue-growth | example | Revenue grows 7.4% annually between two dated totals |
| revenue-bridge-method-note | example | The revenue bridge with the method notes printed |
| revenue-bridge-notes-listed | example | The revenue bridge on a slide with its method notes in the notes list |
| named-periods-and-ranges | torture | PVM names each period and entry or exit range |
| revenue-bridge-no-net-change | example | The revenue bridge without the net change over the closing column |
| no-point-labels | example | The revenue bridge prints no step or total values, and keeps the net change |
| column-overrides | example | A bridge whose long names turn it horizontal takes an authored name band |
Not for
Revenue without unit quantities; pvm derives price, volume and mix from both.