Skip to content
ChartslibraryUI Get Pro

Mix shift chart

100% columns joined by bands, showing how a mix changes across periods.

When to use

  • Revenue mix by plan across years
  • Channel mix shift

When not to use

Good practice

  • Two to six periods, up to eight parts.
  • Order parts consistently, the largest-growing at the top.

Installation

Mix shift chart is a Pro chart.

Installation is part of Pro

The full source is included in the Pro download. Get Pro to install it with the CLI and use it in unlimited projects.

Unlock with Pro
Already have Pro?npx chartslibraryui add mix-shift-chart --from ./chartslibraryui-pro

Usage

Usage examples are part of Pro

Every example on this page comes with its code in the Pro download. The props and data shape below are public.

Unlock with Pro

Data

Rows with a period key and one non-negative key per part.

[{ period: "2024", starter: 0.24, team: 0.35, business: 0.27, enterprise: 0.14 }]

Missing values are null. Invalid values make the chart say what’s wrong instead of drawing a misleading picture. How charts handle bad data

Props

Every chart also accepts the shared frame props: title, subtitle, source, height, mode, toolbar. Common API

export interface MixShiftChartProps extends FrameProps {
  data: Row[];
  /** Period key. */
  x: string;
  /** Part keys, bottom to top. Values can be amounts or shares; each column is normalised to 100%. */
  parts: SeriesInput[];
  /** Format of the raw values (for tooltips and table). */
  format?: FormatInput;
}

Stacked area chart

A total over time and what it's made of, in absolute terms or as 100% shares.

Donut chart

One whole in up to six parts, with the total in the middle and a value legend.