Price-volume-mix chart reference

Price-volume-mix examples

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

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

PathTypeRequiredMeaning
priorLabelstringOpening total-bar name; default Prior.
currentLabelstringClosing total-bar name; default Current.
itemsarrayyesComparable items with prior and current quantities and revenues for the price/volume/mix decomposition.
items[].idstringyesUnique item identity binding prior and current decomposition inputs.
items[].labelstringItem name for the author. The bridge draws effect bars, not items, so no item name prints.
items[].priorobjectyesBase period.
items[].prior.qtynumberyesUnits sold in the period. Never negative; 0 only with revenue 0.
items[].prior.revenuenumberyesRevenue for those units. Price is derived as revenue / qty.
items[].currentobjectyesComparison period.
items[].current.qtynumberyesUnits sold in the period. Never negative; 0 only with revenue 0.
items[].current.revenuenumberyesRevenue for those units. Price is derived as revenue / qty.
priorDatestringISO date of the common base period, attached to the prior total for CAGR.
currentDatestringISO date of the common comparison period, attached to the current total. Effects do not represent elapsed time.
quantityUnitstringThe 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

PathTypeValuesDefaultMeaning
labelsobjectWhich generated numbers print. labelDensity still thins them.
labels.pointfalsefalsefalse 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.
interactionstring'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.
volumeMixstring'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.
methodNotebooleanDefault 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.
netChangebooleantrueDefault 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.
columnOverridesobjectHorizontal 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.*.widthnumberTrack 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.

KindPurposeRequiredAnchorsOptional fieldsNotes
cagrDraws 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.
diffDraws a level-difference arrow between two anchors and computes either percent change or their signed value difference.from, tofrom: AnchorRef; to: AnchorRefmode: 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.
deltaComputes the signed difference between an anchored value and another anchor or literal, then places a collision-managed label at the first anchor.at, vsat: AnchorRef; vs: AnchorRef | numbermode: 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.
notePlaces authored text at an anchored data element through collision avoidance, with an optional icon or status chip.at, textat: AnchorRef
calloutPlaces authored free text at an anchored data element, routing a leader when displaced and honoring the preferred side.at, textat: AnchorRefpreferSide: 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.
valueLineDraws 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.
absReads the anchored data value and places its formatted absolute value in a collision-managed label.atat: AnchorRef
textPlaces 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, textat: 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.
lineDraws 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, tofrom: 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.
arrowDraws 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, tofrom: 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.
boxDraws 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, tofrom: 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

IDKindUse case
fy-revenue-bridgeexampleFY24→FY25 product revenue bridge (six products, one new, one discontinued)
segment-pvm-interaction-splitexampleRegional bridge with the price x volume interaction shown separately
mix-dominates-sign-fliptortureTorture: mix and volume are near-equal opposites, one quantity falls three orders of magnitude, and a line carries negative revenue
fy-revenue-combined-volume-mixexampleFY24 to FY25 revenue bridge with volume and mix combined
dated-revenue-growthexampleRevenue grows 7.4% annually between two dated totals
revenue-bridge-method-noteexampleThe revenue bridge with the method notes printed
revenue-bridge-notes-listedexampleThe revenue bridge on a slide with its method notes in the notes list
named-periods-and-rangestorturePVM names each period and entry or exit range
revenue-bridge-no-net-changeexampleThe revenue bridge without the net change over the closing column
no-point-labelsexampleThe revenue bridge prints no step or total values, and keeps the net change
column-overridesexampleA 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.