KPI card

Put one metric on a KPI card: a label, the big value, up to two comparison chips, an optional attainment and a small trend line with the last value.

React
import { KpiChart } from 'boardplot/react/kpi';
Use for
Headline metric with trend · Metric against PY and plan · Dashboard tile
Not for
Several categories side by side; kpi shows one metric.

Forecast against prior year and plan

FY26 landing forecast $10.6m, −9.0% (−$1.1m) YoY, −11.0% (−$1.3m) vs Plan, 89% of Plan. Landing remains below prior year and plan FY26 landing forecast Source: Illustrative commercial forecast, Jul close $10.6m 89% of Plan 100% −9.0% (−$1.1m) −11.0% (−$1.3m) YoY vs Plan

A KPI card shows a landing forecast of $10.6m, down 9% on the prior year and 11% below plan, with a bar at 89% of plan.

Download SVG Fixture IDdual-compare
JSON spec

This spec includes the theme shown and the options you selected.

Changed from the fixture: data.format.

{
  "type": "kpi",
  "data": {
    "label": "FY26 landing forecast",
    "value": 10600000,
    "format": "$1.1m",
    "compare": [
      {
        "vs": 11650000,
        "label": "YoY",
        "mode": "both"
      },
      {
        "vs": 11910000,
        "label": "vs Plan",
        "mode": "both"
      }
    ],
    "attainment": {
      "vs": 11910000,
      "label": "of Plan"
    }
  },
  "options": {
    "size": {
      "width": 380
    },
    "title": "Landing remains below prior year and plan",
    "source": "Illustrative commercial forecast, Jul close"
  }
}

Churn card where lower is better

Net revenue churn 3.2%, down 0.9pp vs PY. Trend over 8 periods. Churn fell to 3.2% in FY25, down 0.9 points vs PY Net revenue churn Source: Acme SaaS retention cohort model 3.2% −0.9pp vs PY · lower is better

A KPI card shows net revenue churn of 3.2%, down 0.9 points on the prior year, in green because lower is better, with a falling trend line.

Download SVG Fixture IDchurn-card
JSON spec

This spec includes the theme shown and the options you selected.

{
  "type": "kpi",
  "data": {
    "label": "Net revenue churn",
    "value": 3.2,
    "format": "1.2%",
    "delta": {
      "vs": 4.1,
      "scenario": "PY",
      "direction": "lowerIsBetter",
      "mode": "absolute"
    },
    "spark": {
      "kind": "line",
      "values": [
        5.8,
        5.1,
        4.9,
        4.4,
        4.1,
        3.8,
        3.5,
        3.2
      ]
    }
  },
  "options": {
    "title": "Churn fell to 3.2% in FY25, down 0.9 points vs PY",
    "source": "Acme SaaS retention cohort model"
  }
}

Weekly orders with a trend line

Weekly orders, W8 2026 110k, +15% vs W1. Trend over 8 periods. Weekly orders reach 110k, up 15% on the first week Weekly orders, W8 2026 Source: Illustrative order data; W4 was not reported 110k +15% vs W1 W1 W8

A KPI card shows 110k weekly orders, up 15% on week 1, with a sparkline that marks the unreported week 4 as a dotted gap.

Download SVG Fixture IDweekly-orders-card-spark
JSON spec

This spec includes the theme shown and the options you selected.

Changed from the fixture: options.title.

{
  "type": "kpi",
  "data": {
    "label": "Weekly orders, W8 2026",
    "value": 110000,
    "format": "1k",
    "compare": [
      {
        "vs": 96000,
        "label": "vs W1",
        "mode": "relative"
      }
    ],
    "spark": {
      "kind": "line",
      "values": [
        96000,
        98000,
        101000,
        null,
        104000,
        103000,
        107000,
        110000
      ],
      "labels": [
        "W1",
        "W2",
        "W3",
        "W4",
        "W5",
        "W6",
        "W7",
        "W8"
      ]
    }
  },
  "options": {
    "title": "Weekly orders reach 110k, up 15% on the first week",
    "source": "Illustrative order data; W4 was not reported"
  }
}

Subscriber count with year-over-year chip

Option shown: Own colors, the spark in ink.

Active subscribers 48.2k, +7.3% YoY. Trend over 7 periods. Active subscribers are 7% up on the year Active subscribers Source: Illustrative data 48.2k +7.3% YoY

A KPI card shows 48.2k active subscribers, up 7.3% year over year in a green chip, with a rising dark trend line.

Download SVG Fixture IDspark-ink-pale-neutral
JSON spec

This spec includes the theme shown and the options you selected.

Changed from the fixture: options.theme.

{
  "type": "kpi",
  "data": {
    "label": "Active subscribers",
    "value": 48200,
    "format": "1.2k",
    "compare": [
      {
        "vs": 44900,
        "label": "YoY",
        "mode": "relative"
      }
    ],
    "spark": {
      "kind": "line",
      "values": [
        41000,
        42300,
        43500,
        44800,
        45900,
        46900,
        48200
      ]
    }
  },
  "options": {
    "theme": {
      "preset": "bridge",
      "overrides": {
        "color": {
          "neutral": "#C9D2E0",
          "neutralMark": "#0B1B3A",
          "spark": "#0B1B3A"
        }
      }
    },
    "title": "Active subscribers are 7% up on the year",
    "source": "Illustrative data"
  }
}

ARR card with area trend

ARR $182.4m, up 10% vs PY. Trend over 6 periods. Source: Acme SaaS finance actuals, Jun FY26 $182.4m ARR +10% vs PY Jan FY26 Jun FY26

A KPI card shows annual recurring revenue of $182.4m, up 10% on the prior year, with an area sparkline from January to June.

Download SVG Fixture IDarr-card
JSON spec

This spec includes the theme shown and the options you selected.

Changed from the fixture: data.format.

{
  "type": "kpi",
  "data": {
    "label": "ARR",
    "value": 182400000,
    "format": "$1.2m",
    "delta": {
      "vs": 165200000,
      "scenario": "PY"
    },
    "spark": {
      "kind": "area",
      "values": [
        121400000,
        130200000,
        138900000,
        150700000,
        165200000,
        182400000
      ],
      "labels": [
        "Jan FY26",
        "Feb FY26",
        "Mar FY26",
        "Apr FY26",
        "May FY26",
        "Jun FY26"
      ]
    }
  },
  "options": {
    "source": "Acme SaaS finance actuals, Jun FY26"
  }
}

Cash balance with month-end trend

Cash on hand $4.8m. Trend over 3 periods, ending at $4.6m. Today; the trend shows month-end balances. Source: Illustrative treasury data $4.8m Cash on hand Today; the trend shows month-end balances $4.6m Apr Jun

A KPI card shows cash on hand of $4.8m today, with a trend line of month-end balances from April to June that ends at $4.6m.

Download SVG Fixture IDspark-ends-below-card
JSON spec

This spec includes the theme shown and the options you selected.

Changed from the fixture: data.format.

{
  "type": "kpi",
  "data": {
    "label": "Cash on hand",
    "value": 4820000,
    "format": "$1.2m",
    "note": "Today; the trend shows month-end balances",
    "spark": {
      "kind": "line",
      "values": [
        4100000,
        4350000,
        4610000
      ],
      "labels": [
        "Apr",
        "May",
        "Jun"
      ]
    }
  },
  "options": {
    "source": "Illustrative treasury data"
  }
}

Minimal spec

Save this spec as kpi.json and run the command.

{
  "type": "kpi",
  "data": { "label": "Revenue", "value": 120, "delta": { "vs": 100, "scenario": "PY" } },
  "options": { "unit": "$k", "title": "Revenue is $20k above prior year", "source": "Illustrative data" }
}
npx boardplot render kpi.json --out kpi.svg