Templates
Pre-built chart templates for common use cases. Render with query parameter overrides. Use GET /api/v1/templates to list all templates including your custom ones.
Looking for finished, branded examples? The gallery has 15 charts, each with its exact request, and /gallery.json lists them for scripts and agents. Gallery slugs are not template IDs.
Built-in Templates
17 production-ready templates. All support brand kit overrides via brandKitId and data overrides via labels / data query parameters. Each template ships with sample numbers; labels replaces the x-axis labels and data replaces the first series only, so send both together and keep the number of values equal to the number of labels.
| Template ID | Chart | Default size | Description |
|---|---|---|---|
| mrr-trend | line | 800×400 | Monthly recurring revenue with target line and launch window annotations |
| signups-bar | bar | 800×400 | New user signups with on-bar data labels |
| weekly-volume-rate | bar | 800×400 | Bar chart volume with line conversion rate (dual Y axes) |
| plan-distribution | pie | 600×400 | Customer distribution across plans |
| funnel-conversion | bar | 800×400 | User journey conversion rates |
| nps-trend | line | 800×400 | Net Promoter Score over time |
| churn-rate | line | 800×400 | Monthly churn percentage |
| mrr-growth | line (card) | 760×440 | Monthly recurring revenue for 12 months against a target line, as a titled card |
| email-performance | bar | 800×400 | Email campaign metrics |
| ad-spend-roi | bar | 800×400 | Advertising ROI by channel |
| csat-breakdown | doughnut | 600×400 | Customer satisfaction by category |
| support-volume | bar | 800×400 | Support tickets over time |
| pipeline-stages | bar | 800×400 | Deals by sales stage |
| win-rate-trend | line | 800×400 | Sales win rate over time |
| quota-attainment | bar | 800×400 | Team quota achievement |
| ltv-cac | bar | 800×400 | Customer lifetime value vs acquisition cost |
| mrr-growth-rate | bar | 800×400 | MRR growth rate by month |
mrr-growth is the MRR line chart with a target line, drawn as a titled card (it shows the same thing as the gallery's mrr-growth chart; gallery slugs are not template IDs). The bar chart of month-over-month growth is mrr-growth-rate.mrr-growth is always drawn at 3×; scale does not change it.
Rendering a Template
Use the GET endpoint with optional data and style overrides:
GET /api/v1/templates/mrr-trend/render?labels=Jan,Feb,Mar,Apr,May&data=12000,15000,18000,22000,25000&format=png&brandKitId=obsidianOmitting scale defaults to 3× output (retina). Pass scale=1 for 1×.
Query Parameters
| Parameter | Description |
|---|---|
labels | Comma-separated labels; replaces the template's x-axis (or slice) labels |
data | Comma-separated numbers; replaces the first series only |
title | Renames the first series (the legend and tooltip name). It does not add a chart heading |
width, height | Dimensions in pixels (100–4000) |
format | png, jpeg, svg, webp |
brandKitId | Saved kit UUID or preset: obsidian, linen, polar, studio, ember, harbor |
scale / devicePixelRatio | 1–4; defaults to 3 on this route when omitted |
palette | Comma-separated hex colors (URL-encode # as %23) — overrides series colors |
Card Template Example
Templates that include card composition (header, kpiStrip, footer) render the full card. You can also supply a full card spec to POST /api/v1/render directly:
{
"type": "line",
"brandKitId": "obsidian",
"header": {
"eyebrow": "Metrics · Jan–May 2024",
"title": "MRR Trend",
"badge": { "text": "+14%", "backgroundColor": "#166534", "color": "#dcfce7" }
},
"kpiStrip": [
{ "label": "MRR", "value": "$25,000", "color": "#22c55e" },
{ "label": "ARR", "value": "$300k", "color": "#22c55e" },
{ "label": "Growth", "value": "+14%", "color": "#22c55e" }
],
"footer": { "left": "chart-output.com", "right": "Updated daily" },
"data": {
"labels": ["Jan", "Feb", "Mar", "Apr", "May"],
"datasets": [{ "label": "MRR", "data": [12000, 15000, 18000, 22000, 25000] }]
}
}Custom Templates
Save any chart spec as a reusable template via the dashboard or API:
POST /api/v1/templates
{
"name": "Monthly MRR",
"description": "Standard MRR line chart with card",
"chartType": "line",
"spec": { ... } // Any valid chart spec including card composition
}Once saved, render it the same way as built-in templates using the returned UUID as the templateId.