# Large dashboard

Four numbers, a 7-day chart and a short list: the most a large widget holds comfortably. Smaller sizes get just the headline numbers.

**Sizes:** small (revenue), medium (revenue and users), large (everything)
**Freshness:** your agent (or a job, if the data is at a public URL)

## Widget

```json
{
  "slug": "dashboard",
  "title": "Dashboard",
  "symbol": "chart.bar.xaxis",
  "accent": "#0A84FF",
  "blocks": [
    { "type": "metric", "label": "Revenue", "value": "$24.1k", "change": "+8.4%" },
    { "type": "metric", "label": "Users", "value": "1,247", "change": "+34" },
    { "type": "metric", "label": "Churn", "value": "2.1%" },
    { "type": "metric", "label": "MRR", "value": "$8.2k" },
    { "type": "chart", "label": "Revenue, 7 days", "change": "+8.4%", "style": "area",
      "values": [19200, 20100, 21300, 22000, 22800, 23500, 24100] },
    { "type": "list", "title": "Top pages", "items": [
      { "title": "/pricing", "detail": "1,240" },
      { "title": "/features", "detail": "980" },
      { "title": "/blog/launch", "detail": "743" }
    ] }
  ],
  "sizes": { "small": [0], "medium": [0, 1], "large": [0, 1, 2, 3, 4, 5] },
  "lock": { "circular": 0, "inline": "Revenue $24.1k" }
}
```

Large, in points: the first row of numbers has change lines (65), the second doesn't (49), then the chart with label and change (50) and the titled list (83), with 14 pt gaps: 289 of 296. Change lines on all four numbers, or a `value` on the chart, would run past the bottom. Where falling is good (churn), add `"trend": "up"` so a negative change shows green.

Medium shows just two numbers side by side (57 pt on medium). Four numbers with change lines would be two rows, 124 pt.

## As a job

Only if the numbers are at a public https URL returning JSON (a job can't send an auth header):

```json
{
  "action": "schedule",
  "name": "dashboard",
  "widget_slug": "dashboard",
  "every_minutes": 15,
  "fetch": { "url": "https://yourapi.example.com/metrics/summary.json" },
  "values": {
    "revenue": "revenue",
    "revenue_change": "revenue_change_pct",
    "users": "users",
    "new_users": "new_users",
    "revenue_7d": "revenue_7d"
  },
  "widget": {
    "title": "Dashboard",
    "symbol": "chart.bar.xaxis",
    "blocks": [
      { "type": "metric", "label": "Revenue", "value": "{{revenue|money}}", "change": "{{revenue_change|percent}}" },
      { "type": "metric", "label": "Users", "value": "{{users|number}}", "change": "+{{new_users}}" },
      { "type": "chart", "label": "Revenue, 7 days", "values": "{{revenue_7d}}", "style": "area" }
    ],
    "sizes": { "small": [0], "medium": [0, 1], "large": [0, 1, 2] },
    "lock": { "circular": 0 }
  }
}
```

`"values": "{{revenue_7d}}"` puts the array from the response straight into the chart (it must be 2 to 48 numbers). The URL above is a placeholder: test your real one with `test_job`.
