Sparkline chart

A sparkline is a small line chart with no axes that shows the shape of one series. Use it in a KPI card or table row, with value labels or a reference line.

React
import { SparklineChart } from 'boardplot/react/sparkline';
Use for
Trend inside a KPI card · Shape beside a table row · A strip of metrics on one board
Not for
A chart a reader takes numbers off; a sparkline states a shape and nothing else.

Monthly orders with end-point label

Trend over 9 points, ending at 13.1. Orders climb into August and ease to 13.1k in September Orders per month in k orders · Jan to Sep FY26 Source: Illustrative demand data Sep Jan 13.1 11.2 13.4 11.1

A line of monthly orders from January to September. Orders reach 13.4k in August, then fall to 13.1k in September. A ring and a value label mark the last point.

Download SVG Fixture IDorders-nine-months
JSON spec

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

{
  "type": "sparkline",
  "data": {
    "values": [
      11.2,
      11.6,
      11.1,
      12,
      12.4,
      12.1,
      12.9,
      13.4,
      13.1
    ],
    "labels": [
      "Jan",
      "Feb",
      "Mar",
      "Apr",
      "May",
      "Jun",
      "Jul",
      "Aug",
      "Sep"
    ]
  },
  "options": {
    "ring": "last",
    "endLabels": "ends",
    "valueLabel": "last",
    "format": "1.1",
    "size": {
      "width": 520
    },
    "title": "Orders climb into August and ease to 13.1k in September",
    "subtitle": {
      "measure": "Orders per month",
      "period": "Jan to Sep FY26"
    },
    "source": "Illustrative demand data",
    "unit": "k orders"
  }
}

Weekly fill rate against a target line

Trend over 8 points, ending at 5.9, reference 5.0. Weekly fill rate ends above the 5.0 line Source: Illustrative data W8 W1 5.9 5.0

Sparkline of weekly fill rate over eight weeks that crosses a dashed 5.0 reference three times and ends above it at 5.9.

Download SVG Fixture IDreference-inside-data
JSON spec

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

{
  "type": "sparkline",
  "data": {
    "values": [
      4.2,
      4.8,
      5.3,
      4.9,
      4.4,
      5.1,
      5.6,
      5.9
    ],
    "labels": [
      "W1",
      "W2",
      "W3",
      "W4",
      "W5",
      "W6",
      "W7",
      "W8"
    ]
  },
  "options": {
    "reference": 5,
    "ringTone": "good",
    "endLabels": "ends",
    "valueLabel": "last",
    "format": "1.1",
    "size": {
      "width": 320,
      "height": 171
    },
    "title": "Weekly fill rate ends above the 5.0 line",
    "source": "Illustrative data"
  }
}

Bare sparkline for a KPI card

Trend over 7 points, ending at 110.

Small card-size line with a dashed bridge over a missing value marked by a ring, then rising to the right edge.

Download SVG Fixture IDbare-card-spark
JSON spec

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

{
  "type": "sparkline",
  "data": {
    "values": [
      96,
      98,
      101,
      null,
      104,
      103,
      107,
      110
    ],
    "labels": [
      "W1",
      "W2",
      "W3",
      "W4",
      "W5",
      "W6",
      "W7",
      "W8"
    ],
    "label": "Orders"
  },
  "options": {
    "ring": "none",
    "endLabels": "none",
    "valueLabel": "none",
    "title": false
  }
}

Minimal spec

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

{
  "type": "sparkline",
  "data": { "values": [112, 114.2, 113.1, 116.8, 118.4], "labels": ["May", "Jun", "Jul", "Aug", "Sep"] },
  "options": { "format": "1.1", "title": "Orders climb through the summer", "source": "Illustrative data" }
}
npx boardplot render sparkline.json --out sparkline.svg