Kit extensions

Metric Card

A single metric with a delta chip, prior-period comparison, and a median-graded trend

Eric SummersUpdated 2026-09-18markdown

A custom mark type that turns one measure + one date into a clean, interactive metric card, bound to the Marks card (so it travels with the worksheet).

Shared viz-extension techniques (reading encodings, live updates, responsive/no-scroll degradation, etc.) live globally in reference/viz-extensions.md. This file covers only what's specific to the Metric Card.

What it is

Encodings (Marks card)

Tile Required Accepts
Measure yes one continuous measure (e.g. SUM(Sales)), the headline + chart value
Date yes one date, use a continuous date (e.g. MONTH(Order Date))
Prior flag shelf no a boolean field, TRUE for prior-period rows, only for the "prior period (flag field)" comparison mode

Run it locally

From the repo root: python scripts/kitserve.py (serves every extension on 8765). It answers on both IPv4 and IPv6 and resolves lib/ to _shared/lib; a plain python -m http.server does neither, which is what makes a local extension load as a blank or errored zone.

In Tableau, on a worksheet's Marks card → mark-type dropdown → Add Extension… → Access Local Extensions → manifest.local.trex. Drag a measure onto Measure and a continuous date onto Date.

Get it

Metric Card ships in the Extension Kit ($59). See it live on the demo gallery.