Numbers

Stat

Add a stat panel when a canvas page needs one large figure with a change chip and a trend line, without a comparison column.

What you can do

  • valueField and agg (sum, avg, last, first, min, max, count, delta) pick the headline exactly as on a kpi card, and format takes the same FormatObject.
  • delta and sparkline are booleans here rather than objects: delta: true adds the period-over-period chip and sparkline: true draws the trend from valueField; both need at least two rows and both default to false.
  • valueSize defaults to 64 (a kpi defaults to 36), so a stat reads as a large canvas figure; align is left or center.
  • label sits above the value, caption below it, and description becomes the hover tooltip; color accepts a theme token such as {chart.series.2} or a primitive you declare in the dashboard theme.

Applies to a stat panel, which must carry a data block; stat and kpi share the same headline-value and delta-chip primitives, so pick kpi when you need comparison.field or improvement, and stat for a plain canvas figure.

Spec

View spec
{
  "id": "revenue-stat",
  "type": "stat",
  "title": "Revenue booked",
  "data": {
    "rows": [
      {
        "month": "Jan",
        "revenue": 362000
      },
      {
        "month": "Feb",
        "revenue": 384000
      },
      {
        "month": "Mar",
        "revenue": 401000
      },
      {
        "month": "Apr",
        "revenue": 396000
      },
      {
        "month": "May",
        "revenue": 418000
      },
      {
        "month": "Jun",
        "revenue": 439000
      }
    ]
  },
  "spec": {
    "label": "Revenue booked, H1",
    "valueField": "revenue",
    "agg": "sum",
    "format": {
      "type": "currency",
      "currency": "USD",
      "compact": true
    },
    "color": "{chart.series.2}",
    "delta": true,
    "sparkline": true,
    "caption": "Completed orders, six months."
  }
}

agg: "sum" totals the six months for the headline while delta: true still compares the last two rows and sparkline: true draws all six.

Try it live

Open the revenue-overview template in the Builder

Open the revenue-overview template: rev-stat-total, rev-stat-orders, and rev-stat-aov are three stats, each over its own monthly query, all with delta and sparkline on.

Build it in dvt

Every block on this page is a few lines of the same declarative JSON spec. Read the full spec format, or connect an AI agent to your warehouse and build one live in the quickstart.

Follow the build

dvt is in founding research. Leave your email and we'll reach out when there's something to see — no newsletters, no noise.

No spam. We use this to reach out directly, nothing else.