Skip to main content
You will end with a page of revenue by region, with a headline, a trend, a breakdown and a filter, built on the sample project from the quickstart. It takes about ten minutes. Keep hatchmark dev --open running while you work. The page updates on every save, and problems show over the page.

1. Start the file

Every file under dashboards/ is one page, named after the file. Create dashboards/regions.yaml:
period sets one window for every block on the page. The values are in the dashboards reference.

2. Lead with the headline numbers

Start with the three or four numbers a reader checks first. Consecutive KPIs share one card.
Each KPI shows its change against the previous period, coloured by the metric’s better. See KPI.

3. Show the trend

Add a line chart under the KPIs. split draws one line per region, and span: 8 leaves room for a breakdown beside it.
Title a card with its finding once you know it, such as “The West grew fastest”. Hatchmark adds a subtitle that says what is measured.

4. Break it down

Put a ranking beside the trend and the detail below it.
A table’s total row is recomputed from the rows, so the average order value in it is the real average, not an average of averages. See Bar and Table.

5. Let readers filter

Filters sit in the page header. Add a region picker and a choice of periods:
The page stays static: build computes every preset and value up front, and the page carries the numbers each choice needs. The choice is kept in the URL, so a shared link opens the same view. See Filters.

6. Check and build

check reports each problem with a code, the file and line, and a fix. hatchmark explain <code> says more about one code. build writes dist/regions/index.html.

Next