Writing reports
Components
Reference
A named metric's one-line definition, quoted in the dialog from app/src/metrics/metrics.ts.
<Definition> prints the one-line definition of a
named metric, from app/src/metrics/metrics.ts.
Use it in the dialog so the report quotes the
definition the metric holds, instead of restating it. The app starts with no
metrics; add one before using this. Every metric is also written out on the
wiki’s Metrics page.
Example#
With a metric averageOrder in metrics.ts:
Sales
Sales per region.
Data as of 8 Oct 2026, 09:00
InfoTechnical
The measure
Sales ÷ orders, by the day the order was paid.
(
The measure
),
}," data-language="tsx">import { Definition, H2, Info } from "~/components/report-kit/info"
// in defineReport({ … })
page: {
info: () => (
<Info>
<H2>The measure</H2>
<Definition name="averageOrder" />
</Info>
),
},Props#
| Name | Type | Required | Default | Meaning |
|---|---|---|---|---|
name |
metric name | yes | A metric in app/src/metrics/metrics.ts |
Checks#
A name that is not a metric stops the dialog with an error naming it.