Gallery / Dashboards and reports /
Executive dashboard
A business dashboard: KPI tiles with sparklines, a trend against plan, a donut, a bridge and a funnel in a grid.
111.9 KB of code · core 29.5 + 24 blocks 82.4
On a page of its own this chart would need 10 blocks, 65.4 KB with the core:
On a page of its own this chart would need 8 blocks, 58.6 KB with the core:
On a page of its own this chart would need 10 blocks, 65.4 KB with the core:
On a page of its own this chart would need 10 blocks, 65.4 KB with the core:
Revenue against plan
Monthly revenue (the filled line) and the plan (dashed). The plan was beaten from October on.
On a page of its own this chart would need 13 blocks, 77.3 KB with the core:
Revenue by channel
Organic brings over a third of the revenue, paid search a quarter.
On a page of its own this chart would need 7 blocks, 60.5 KB with the core:
From revenue to operating profit
Q4. Green adds, red takes away; blue bars are the totals so far.
On a page of its own this chart would need 12 blocks, 74.0 KB with the core:
Checkout funnel
December. The share of visitors who reached each stage.
On a page of its own this chart would need 11 blocks, 72.7 KB with the core:
What the report is made of
The composer reads the JSON below and puts into the page the core and only the blocks its charts use: 24 of the 59, 111.9 KB of code, minified, which is 52% of the 215.9 KB that the core and every block weigh together. A block that two charts use is carried once. The report file is 126.8 KB: that code, the data, the styles and the page around them.
| Block | What it does | Share of the code | KB |
|---|---|---|---|
core.composed-plain A report with plain data: no checks, no decoder. Most reports. | A report with plain data: no checks, no decoder. Most reports. | 29.5 | |
lib.columns Checks the columns a transform reads and writes. Shared by contour, funnel, hexbin, sankey, treemap and waterfall. | Checks the columns a transform reads and writes. Shared by contour, funnel, hexbin, sankey, treemap and waterfall. | 0.6 | |
lib.curve The path of a line: straight segments, a smooth curve that never overshoots, or steps. Shared by line and area. | The path of a line: straight segments, a smooth curve that never overshoots, or steps. Shared by line and area. | 1.2 | |
lib.pointer Where the pointer is on the chart, and following a mouse or a finger once a frame. Shared by tooltip, crosshair, zoom and brush. | Where the pointer is on the chart, and following a mouse or a finger once a frame. Shared by tooltip, crosshair, zoom and brush. | 1.7 | |
lib.ticks Round steps and ticks (1, 2 or 5 × 10ⁿ). Shared by the number scales and the histogram bins. | Round steps and ticks (1, 2 or 5 × 10ⁿ). Shared by the number scales and the histogram bins. | 0.7 | |
scale.band One band per category: the axis of bar charts. | One band per category: the axis of bar charts. | 1.2 | |
scale.color A color per category, from the theme palette. | A color per category, from the theme palette. | 0.8 | |
scale.linear Numbers to positions, with round ticks. | Numbers to positions, with round ticks. | 1.6 | |
scale.time Dates to positions, ticks in days, months or years (UTC). | Dates to positions, ticks in days, months or years (UTC). | 4.1 | |
transform.funnel Stage widths and conversion rates of a funnel. | Stage widths and conversion rates of a funnel. | 1.4 | |
transform.waterfall Increases, decreases and subtotals of a bridge chart. | Increases, decreases and subtotals of a bridge chart. | 1.8 | |
mark.arc Pie and donut slices; gauges and progress rings. | Pie and donut slices; gauges and progress rings. | 4.9 | |
mark.area Filled areas, stacked or not. | Filled areas, stacked or not. | 2.9 | |
mark.line A line per series, with optional end labels. | A line per series, with optional end labels. | 4.4 | |
mark.rect Rectangles: bars, grouped bars, ranges, heatmap cells; the hexagons of a hexbin. | Rectangles: bars, grouped bars, ranges, heatmap cells; the hexagons of a hexbin. | 4.5 | |
mark.text Value labels that shrink, or step aside, when they do not fit. | Value labels that shrink, or step aside, when they do not fit. | 5.3 | |
guide.axis Axes: formatted labels, a title, long categories wrapped. | Axes: formatted labels, a title, long categories wrapped. | 11.7 | |
guide.grid Grid lines at the ticks. | Grid lines at the ticks. | 0.6 | |
guide.kpi A KPI tile: the figure, its change, a sparkline. | A KPI tile: the figure, its change, a sparkline. | 4.9 | |
guide.legend Legends: categories, a color bar, bubble sizes. | Legends: categories, a color bar, bubble sizes. | 6.0 | |
interaction.animate Draws the chart in once, when it first appears. | Draws the chart in once, when it first appears. | 2.4 | |
interaction.crosshair A line that follows the pointer across all series. | A line that follows the pointer across all series. | 2.1 | |
interaction.legend-filter Click a legend item to hide or show its series. | Click a legend item to hide or show its series. | 3.0 | |
interaction.tooltip The values under the pointer. | The values under the pointer. | 10.7 | |
renderer.svg Draws into SVG: sharp, selectable, prints well. The default. | Draws into SVG: sharp, selectable, prints well. The default. | 3.9 | |
| Total | The core 29.5 and 24 blocks 82.4 | 111.9 |
The JSON
This is the whole input. data holds the datasets, each chart is a spec that names one.
In a checkout of the repository: node scripts/compose.js skills/blockcharts/recipes/executive-dashboard.json report.html.
Saved as page.json, it composes the same with the skill's own runtime/compose.js.
executive-dashboard.json
{
"title": "Executive dashboard",
"subtitle": "FY2025 · all regions · figures in USD",
"layout": {
"columns": 4,
"phoneColumns": 2
},
"data": {
"monthly": [
{
"month": "2025-01-01",
"revenue": 182400,
"target": 200000,
"orders": 1840,
"conversion": 0.0312,
"churn": 0.042
},
{
"month": "2025-02-01",
"revenue": 195100,
"target": 209000,
"orders": 1925,
"conversion": 0.0318,
"churn": 0.041
},
{
"month": "2025-03-01",
"revenue": 210300,
"target": 218000,
"orders": 2070,
"conversion": 0.0321,
"churn": 0.041
},
{
"month": "2025-04-01",
"revenue": 204200,
"target": 227000,
"orders": 2010,
"conversion": 0.0315,
"churn": 0.04
},
{
"month": "2025-05-01",
"revenue": 226500,
"target": 236000,
"orders": 2195,
"conversion": 0.0327,
"churn": 0.039
},
{
"month": "2025-06-01",
"revenue": 241300,
"target": 245000,
"orders": 2330,
"conversion": 0.0331,
"churn": 0.039
},
{
"month": "2025-07-01",
"revenue": 238200,
"target": 254000,
"orders": 2290,
"conversion": 0.0329,
"churn": 0.038
},
{
"month": "2025-08-01",
"revenue": 255400,
"target": 263000,
"orders": 2455,
"conversion": 0.0336,
"churn": 0.037
},
{
"month": "2025-09-01",
"revenue": 268100,
"target": 272000,
"orders": 2560,
"conversion": 0.0341,
"churn": 0.037
},
{
"month": "2025-10-01",
"revenue": 281700,
"target": 281000,
"orders": 2680,
"conversion": 0.0347,
"churn": 0.036
},
{
"month": "2025-11-01",
"revenue": 297300,
"target": 290000,
"orders": 2815,
"conversion": 0.0352,
"churn": 0.036
},
{
"month": "2025-12-01",
"revenue": 312600,
"target": 300000,
"orders": 2960,
"conversion": 0.0358,
"churn": 0.035
}
],
"channels": [
{
"channel": "Organic",
"revenue": 1082000
},
{
"channel": "Paid search",
"revenue": 771000
},
{
"channel": "Referral",
"revenue": 403000
},
{
"channel": "Email",
"revenue": 342000
},
{
"channel": "Social",
"revenue": 315100
}
],
"bridge": [
{
"item": "Revenue",
"value": 891600,
"subtotal": false
},
{
"item": "Cost of sales",
"value": -348200,
"subtotal": false
},
{
"item": "Gross profit",
"value": null,
"subtotal": true
},
{
"item": "Marketing",
"value": -121500,
"subtotal": false
},
{
"item": "Salaries",
"value": -207800,
"subtotal": false
},
{
"item": "Other income",
"value": 33900,
"subtotal": false
},
{
"item": "Operating profit",
"value": null,
"subtotal": true
}
],
"funnel": [
{
"stage": "Visits",
"users": 48200
},
{
"stage": "Product views",
"users": 21500
},
{
"stage": "Add to cart",
"users": 6400
},
{
"stage": "Checkout",
"users": 3100
},
{
"stage": "Purchase",
"users": 2270
}
]
},
"charts": [
{
"span": 1,
"spec": {
"data": "monthly",
"size": [
280,
150
],
"padding": {
"top": 4,
"right": 2,
"bottom": 4,
"left": 2
},
"scales": {
"x": {
"type": "time"
},
"y": {
"type": "linear"
}
},
"guides": [
{
"type": "kpi",
"field": "revenue",
"label": "Revenue, December",
"format": {
"style": "currency",
"currency": "USD",
"notation": "compact",
"maximumFractionDigits": 1
},
"note": "vs November"
}
],
"marks": [
{
"type": "area",
"x": "month",
"y": "revenue",
"fade": true,
"curve": "smooth",
"toBottom": true,
"fill": "var(--bc-c0, #3a6fe4)"
},
{
"type": "line",
"x": "month",
"y": "revenue",
"curve": "smooth",
"stroke": "var(--bc-c0, #3a6fe4)"
}
],
"interaction": [
{
"type": "tooltip",
"fields": [
"revenue"
],
"formats": {
"month": {
"month": "long",
"year": "numeric",
"timeZone": "UTC"
},
"revenue": {
"style": "currency",
"currency": "USD",
"maximumFractionDigits": 0
}
},
"labels": {
"revenue": "Revenue"
}
}
]
}
},
{
"span": 1,
"spec": {
"data": "monthly",
"size": [
280,
150
],
"padding": {
"top": 4,
"right": 2,
"bottom": 4,
"left": 2
},
"scales": {
"x": {
"type": "band",
"paddingInner": 0.3
},
"y": {
"type": "linear",
"zero": true
}
},
"guides": [
{
"type": "kpi",
"field": "orders",
"label": "Orders",
"format": "integer",
"note": "vs November"
}
],
"marks": [
{
"type": "rect",
"x": "month",
"y": "orders",
"fill": "var(--bc-c1, #16a39d)",
"radius": 2
}
],
"interaction": [
{
"type": "tooltip",
"fields": [
"orders"
],
"formats": {
"month": {
"month": "long",
"year": "numeric",
"timeZone": "UTC"
},
"orders": "integer"
},
"labels": {
"orders": "Orders"
}
}
]
}
},
{
"span": 1,
"spec": {
"data": "monthly",
"size": [
280,
150
],
"padding": {
"top": 4,
"right": 2,
"bottom": 4,
"left": 2
},
"scales": {
"x": {
"type": "time"
},
"y": {
"type": "linear"
}
},
"guides": [
{
"type": "kpi",
"field": "conversion",
"label": "Conversion rate",
"format": {
"style": "percent",
"minimumFractionDigits": 2
},
"compare": "first",
"note": "since January"
}
],
"marks": [
{
"type": "area",
"x": "month",
"y": "conversion",
"fade": true,
"curve": "smooth",
"toBottom": true,
"fill": "var(--bc-c4, #8a6be8)"
},
{
"type": "line",
"x": "month",
"y": "conversion",
"curve": "smooth",
"stroke": "var(--bc-c4, #8a6be8)"
}
],
"interaction": [
{
"type": "tooltip",
"fields": [
"conversion"
],
"formats": {
"month": {
"month": "long",
"year": "numeric",
"timeZone": "UTC"
},
"conversion": {
"style": "percent",
"minimumFractionDigits": 2
}
},
"labels": {
"conversion": "Conversion rate"
}
}
]
}
},
{
"span": 1,
"spec": {
"data": "monthly",
"size": [
280,
150
],
"padding": {
"top": 4,
"right": 2,
"bottom": 4,
"left": 2
},
"scales": {
"x": {
"type": "time"
},
"y": {
"type": "linear"
}
},
"guides": [
{
"type": "kpi",
"field": "churn",
"label": "Monthly churn",
"format": {
"style": "percent",
"minimumFractionDigits": 1
},
"compare": "first",
"better": "down",
"note": "since January"
}
],
"marks": [
{
"type": "area",
"x": "month",
"y": "churn",
"fade": true,
"curve": "smooth",
"toBottom": true,
"fill": "var(--bc-c3, #e0527a)"
},
{
"type": "line",
"x": "month",
"y": "churn",
"curve": "smooth",
"stroke": "var(--bc-c3, #e0527a)"
}
],
"interaction": [
{
"type": "tooltip",
"fields": [
"churn"
],
"formats": {
"month": {
"month": "long",
"year": "numeric",
"timeZone": "UTC"
},
"churn": {
"style": "percent",
"minimumFractionDigits": 1
}
},
"labels": {
"churn": "Monthly churn"
}
}
]
}
},
{
"span": 3,
"title": "Revenue against plan",
"note": "Monthly revenue (the filled line) and the plan (dashed). The plan was beaten from October on.",
"spec": {
"data": "monthly",
"size": [
860,
300
],
"scales": {
"x": {
"type": "time"
},
"y": {
"type": "linear",
"zero": true
}
},
"guides": [
{
"type": "grid",
"scale": "y"
},
{
"type": "axis",
"scale": "x",
"format": {
"month": "short"
}
},
{
"type": "axis",
"scale": "y",
"format": {
"style": "currency",
"currency": "USD",
"notation": "compact"
}
}
],
"marks": [
{
"type": "area",
"x": "month",
"y": "revenue",
"fade": true,
"curve": "smooth",
"fill": "var(--bc-c0, #3a6fe4)"
},
{
"type": "line",
"x": "month",
"y": "target",
"stroke": "var(--bc-label, #64748b)",
"strokeWidth": 1.5,
"dash": [
5,
4
],
"label": "name",
"name": "Plan"
},
{
"type": "line",
"x": "month",
"y": "revenue",
"curve": "smooth",
"strokeWidth": 2.5,
"stroke": "var(--bc-c0, #3a6fe4)",
"label": "name",
"name": "Revenue"
}
],
"interaction": [
{
"type": "tooltip",
"fields": ["revenue", "target"],
"formats": {
"revenue": { "style": "currency", "currency": "USD", "maximumFractionDigits": 0 },
"target": { "style": "currency", "currency": "USD", "maximumFractionDigits": 0 }
},
"labels": { "revenue": "Revenue", "target": "Plan" }
},
{
"type": "crosshair"
},
{
"type": "animate"
}
],
"padding": {
"right": 96
}
}
},
{
"span": 1,
"title": "Revenue by channel",
"note": "Organic brings over a third of the revenue, paid search a quarter.",
"spec": {
"data": "channels",
"size": [
280,
320
],
"scales": {
"color": {
"type": "color"
}
},
"guides": [
{
"type": "legend",
"scale": "color",
"position": "bottom"
}
],
"marks": [
{
"type": "arc",
"value": "revenue",
"color": "channel",
"innerRadius": 0.62,
"padAngle": 0.02,
"sort": "desc"
}
],
"interaction": [
{
"type": "tooltip",
"formats": { "revenue": { "style": "currency", "currency": "USD", "notation": "compact", "maximumFractionDigits": 1 } },
"heading": "channel",
"fields": ["revenue"],
"labels": { "revenue": "Revenue" }
},
{
"type": "legend-filter"
}
]
}
},
{
"span": 2,
"title": "From revenue to operating profit",
"note": "Q4. Green adds, red takes away; blue bars are the totals so far.",
"spec": {
"data": "bridge",
"size": [
560,
300
],
"padding": {
"top": 28
},
"transforms": [
{
"type": "waterfall",
"field": "value",
"total": "subtotal"
}
],
"scales": {
"x": {
"type": "band",
"paddingInner": 0.28
},
"y": {
"type": "linear",
"zero": true
},
"color": {
"type": "color",
"domain": [
"increase",
"decrease",
"total"
],
"range": [
"var(--bc-c6, #2e9e62)",
"var(--bc-c3, #e0527a)",
"var(--bc-c0, #3a6fe4)"
]
}
},
"guides": [
{
"type": "axis",
"scale": "x"
}
],
"marks": [
{
"type": "rect",
"x": "item",
"y": "value1",
"y2": "value0",
"color": "step",
"radius": 3
},
{
"type": "text",
"x": "item",
"y": "value1",
"text": "amount",
"sign": "amount",
"negative": "flip",
"format": {
"style": "currency",
"currency": "USD",
"notation": "compact",
"maximumFractionDigits": 0
},
"baseline": "auto",
"dy": -6,
"weight": 600
}
],
"interaction": [
{
"type": "tooltip",
"fields": [
"amount"
],
"formats": {
"amount": {
"style": "currency",
"currency": "USD",
"maximumFractionDigits": 0
}
}
}
]
}
},
{
"span": 2,
"title": "Checkout funnel",
"note": "December. The share of visitors who reached each stage.",
"spec": {
"data": "funnel",
"size": [
560,
300
],
"padding": {
"right": 60
},
"transforms": [
{
"type": "funnel",
"field": "users"
}
],
"scales": {
"y": {
"type": "band",
"paddingInner": 0.22
},
"x": {
"type": "linear"
}
},
"guides": [
{
"type": "axis",
"scale": "y"
}
],
"marks": [
{
"type": "rect",
"x": "users0",
"x2": "users1",
"y": "stage",
"radius": 4
},
{
"type": "text",
"x": "users1",
"y": "stage",
"text": "rate",
"format": {
"style": "percent",
"maximumFractionDigits": 1
},
"anchor": "start",
"dx": 8,
"weight": 600
}
],
"interaction": [
{
"type": "tooltip",
"fields": ["users", "rate", "stepRate"],
"formats": {
"users": "integer",
"rate": { "style": "percent", "maximumFractionDigits": 1 },
"stepRate": { "style": "percent", "maximumFractionDigits": 1 }
},
"labels": { "users": "Users" }
}
]
}
}
]
}
The report the composer makes from it is one standalone file (126.8 KB): open it from disk, mail it, print it.
In a page of your own
The charts above use the full kit (81.8 KB gzipped), the smallest one that has the blocks this example needs:
lib.columns, lib.curve, lib.pointer, lib.ticks, scale.band, scale.color, scale.linear, scale.time, transform.funnel, transform.waterfall, mark.arc, mark.area, mark.line, mark.rect, mark.text, guide.axis, guide.grid, guide.kpi, guide.legend, interaction.animate, interaction.crosshair, interaction.legend-filter, interaction.tooltip, renderer.svg.
The HTML below loads it from the jsDelivr CDN, pinned to version 0.0.5; to serve it from your own site, put its file there
(the files of a release) and change the address.
HTML
<script src="https://cdn.jsdelivr.net/npm/blockcharts@0.0.5/release/kits/full.js"></script>
<script type="application/json" id="bc-data">
{"monthly":[{"month":"2025-01-01","revenue":182400,"target":200000,"orders":1840,"conversion":0.0312,"churn":0.042},{"month":"2025-02-01","revenue":195100,"target":209000,"orders":1925,"conversion":0.0318,"churn":0.041},{"month":"2025-03-01","revenue":210300,"target":218000,"orders":2070,"conversion":0.0321,"churn":0.041},{"month":"2025-04-01","revenue":204200,"target":227000,"orders":2010,"conversion":0.0315,"churn":0.04},{"month":"2025-05-01","revenue":226500,"target":236000,"orders":2195,"conversion":0.0327,"churn":0.039},{"month":"2025-06-01","revenue":241300,"target":245000,"orders":2330,"conversion":0.0331,"churn":0.039},{"month":"2025-07-01","revenue":238200,"target":254000,"orders":2290,"conversion":0.0329,"churn":0.038},{"month":"2025-08-01","revenue":255400,"target":263000,"orders":2455,"conversion":0.0336,"churn":0.037},{"month":"2025-09-01","revenue":268100,"target":272000,"orders":2560,"conversion":0.0341,"churn":0.037},{"month":"2025-10-01","revenue":281700,"target":281000,"orders":2680,"conversion":0.0347,"churn":0.036},{"month":"2025-11-01","revenue":297300,"target":290000,"orders":2815,"conversion":0.0352,"churn":0.036},{"month":"2025-12-01","revenue":312600,"target":300000,"orders":2960,"conversion":0.0358,"churn":0.035}],"channels":[{"channel":"Organic","revenue":1082000},{"channel":"Paid search","revenue":771000},{"channel":"Referral","revenue":403000},{"channel":"Email","revenue":342000},{"channel":"Social","revenue":315100}],"bridge":[{"item":"Revenue","value":891600,"subtotal":false},{"item":"Cost of sales","value":-348200,"subtotal":false},{"item":"Gross profit","value":null,"subtotal":true},{"item":"Marketing","value":-121500,"subtotal":false},{"item":"Salaries","value":-207800,"subtotal":false},{"item":"Other income","value":33900,"subtotal":false},{"item":"Operating profit","value":null,"subtotal":true}],"funnel":[{"stage":"Visits","users":48200},{"stage":"Product views","users":21500},{"stage":"Add to cart","users":6400},{"stage":"Checkout","users":3100},{"stage":"Purchase","users":2270}]}
</script>
<script type="application/json" data-bc-chart>
{
"data": "monthly",
"size": [
280,
150
],
"padding": {
"top": 4,
"right": 2,
"bottom": 4,
"left": 2
},
"scales": {
"x": {
"type": "time"
},
"y": {
"type": "linear"
}
},
"guides": [
{
"type": "kpi",
"field": "revenue",
"label": "Revenue, December",
"format": {
"style": "currency",
"currency": "USD",
"notation": "compact",
"maximumFractionDigits": 1
},
"note": "vs November"
}
],
"marks": [
{
"type": "area",
"x": "month",
"y": "revenue",
"fade": true,
"curve": "smooth",
"toBottom": true,
"fill": "var(--bc-c0, #3a6fe4)"
},
{
"type": "line",
"x": "month",
"y": "revenue",
"curve": "smooth",
"stroke": "var(--bc-c0, #3a6fe4)"
}
],
"interaction": [
{
"type": "tooltip",
"fields": [
"revenue"
],
"formats": {
"month": {
"month": "long",
"year": "numeric",
"timeZone": "UTC"
},
"revenue": {
"style": "currency",
"currency": "USD",
"maximumFractionDigits": 0
}
},
"labels": {
"revenue": "Revenue"
}
}
]
}
</script>
<script type="application/json" data-bc-chart>
{
"data": "monthly",
"size": [
280,
150
],
"padding": {
"top": 4,
"right": 2,
"bottom": 4,
"left": 2
},
"scales": {
"x": {
"type": "band",
"paddingInner": 0.3
},
"y": {
"type": "linear",
"zero": true
}
},
"guides": [
{
"type": "kpi",
"field": "orders",
"label": "Orders",
"format": "integer",
"note": "vs November"
}
],
"marks": [
{
"type": "rect",
"x": "month",
"y": "orders",
"fill": "var(--bc-c1, #16a39d)",
"radius": 2
}
],
"interaction": [
{
"type": "tooltip",
"fields": [
"orders"
],
"formats": {
"month": {
"month": "long",
"year": "numeric",
"timeZone": "UTC"
},
"orders": "integer"
},
"labels": {
"orders": "Orders"
}
}
]
}
</script>
<script type="application/json" data-bc-chart>
{
"data": "monthly",
"size": [
280,
150
],
"padding": {
"top": 4,
"right": 2,
"bottom": 4,
"left": 2
},
"scales": {
"x": {
"type": "time"
},
"y": {
"type": "linear"
}
},
"guides": [
{
"type": "kpi",
"field": "conversion",
"label": "Conversion rate",
"format": {
"style": "percent",
"minimumFractionDigits": 2
},
"compare": "first",
"note": "since January"
}
],
"marks": [
{
"type": "area",
"x": "month",
"y": "conversion",
"fade": true,
"curve": "smooth",
"toBottom": true,
"fill": "var(--bc-c4, #8a6be8)"
},
{
"type": "line",
"x": "month",
"y": "conversion",
"curve": "smooth",
"stroke": "var(--bc-c4, #8a6be8)"
}
],
"interaction": [
{
"type": "tooltip",
"fields": [
"conversion"
],
"formats": {
"month": {
"month": "long",
"year": "numeric",
"timeZone": "UTC"
},
"conversion": {
"style": "percent",
"minimumFractionDigits": 2
}
},
"labels": {
"conversion": "Conversion rate"
}
}
]
}
</script>
<script type="application/json" data-bc-chart>
{
"data": "monthly",
"size": [
280,
150
],
"padding": {
"top": 4,
"right": 2,
"bottom": 4,
"left": 2
},
"scales": {
"x": {
"type": "time"
},
"y": {
"type": "linear"
}
},
"guides": [
{
"type": "kpi",
"field": "churn",
"label": "Monthly churn",
"format": {
"style": "percent",
"minimumFractionDigits": 1
},
"compare": "first",
"better": "down",
"note": "since January"
}
],
"marks": [
{
"type": "area",
"x": "month",
"y": "churn",
"fade": true,
"curve": "smooth",
"toBottom": true,
"fill": "var(--bc-c3, #e0527a)"
},
{
"type": "line",
"x": "month",
"y": "churn",
"curve": "smooth",
"stroke": "var(--bc-c3, #e0527a)"
}
],
"interaction": [
{
"type": "tooltip",
"fields": [
"churn"
],
"formats": {
"month": {
"month": "long",
"year": "numeric",
"timeZone": "UTC"
},
"churn": {
"style": "percent",
"minimumFractionDigits": 1
}
},
"labels": {
"churn": "Monthly churn"
}
}
]
}
</script>
<script type="application/json" data-bc-chart>
{
"data": "monthly",
"size": [
860,
300
],
"scales": {
"x": {
"type": "time"
},
"y": {
"type": "linear",
"zero": true
}
},
"guides": [
{
"type": "grid",
"scale": "y"
},
{
"type": "axis",
"scale": "x",
"format": {
"month": "short"
}
},
{
"type": "axis",
"scale": "y",
"format": {
"style": "currency",
"currency": "USD",
"notation": "compact"
}
}
],
"marks": [
{
"type": "area",
"x": "month",
"y": "revenue",
"fade": true,
"curve": "smooth",
"fill": "var(--bc-c0, #3a6fe4)"
},
{
"type": "line",
"x": "month",
"y": "target",
"stroke": "var(--bc-label, #64748b)",
"strokeWidth": 1.5,
"dash": [
5,
4
],
"label": "name",
"name": "Plan"
},
{
"type": "line",
"x": "month",
"y": "revenue",
"curve": "smooth",
"strokeWidth": 2.5,
"stroke": "var(--bc-c0, #3a6fe4)",
"label": "name",
"name": "Revenue"
}
],
"interaction": [
{
"type": "tooltip",
"fields": [
"revenue",
"target"
],
"formats": {
"revenue": {
"style": "currency",
"currency": "USD",
"maximumFractionDigits": 0
},
"target": {
"style": "currency",
"currency": "USD",
"maximumFractionDigits": 0
}
},
"labels": {
"revenue": "Revenue",
"target": "Plan"
}
},
{
"type": "crosshair"
},
{
"type": "animate"
}
],
"padding": {
"right": 96
},
"alt": "Revenue against plan"
}
</script>
<script type="application/json" data-bc-chart>
{
"data": "channels",
"size": [
280,
320
],
"scales": {
"color": {
"type": "color"
}
},
"guides": [
{
"type": "legend",
"scale": "color",
"position": "bottom"
}
],
"marks": [
{
"type": "arc",
"value": "revenue",
"color": "channel",
"innerRadius": 0.62,
"padAngle": 0.02,
"sort": "desc"
}
],
"interaction": [
{
"type": "tooltip",
"formats": {
"revenue": {
"style": "currency",
"currency": "USD",
"notation": "compact",
"maximumFractionDigits": 1
}
},
"heading": "channel",
"fields": [
"revenue"
],
"labels": {
"revenue": "Revenue"
}
},
{
"type": "legend-filter"
}
],
"alt": "Revenue by channel"
}
</script>
<script type="application/json" data-bc-chart>
{
"data": "bridge",
"size": [
560,
300
],
"padding": {
"top": 28
},
"transforms": [
{
"type": "waterfall",
"field": "value",
"total": "subtotal"
}
],
"scales": {
"x": {
"type": "band",
"paddingInner": 0.28
},
"y": {
"type": "linear",
"zero": true
},
"color": {
"type": "color",
"domain": [
"increase",
"decrease",
"total"
],
"range": [
"var(--bc-c6, #2e9e62)",
"var(--bc-c3, #e0527a)",
"var(--bc-c0, #3a6fe4)"
]
}
},
"guides": [
{
"type": "axis",
"scale": "x"
}
],
"marks": [
{
"type": "rect",
"x": "item",
"y": "value1",
"y2": "value0",
"color": "step",
"radius": 3
},
{
"type": "text",
"x": "item",
"y": "value1",
"text": "amount",
"sign": "amount",
"negative": "flip",
"format": {
"style": "currency",
"currency": "USD",
"notation": "compact",
"maximumFractionDigits": 0
},
"baseline": "auto",
"dy": -6,
"weight": 600
}
],
"interaction": [
{
"type": "tooltip",
"fields": [
"amount"
],
"formats": {
"amount": {
"style": "currency",
"currency": "USD",
"maximumFractionDigits": 0
}
}
}
],
"alt": "From revenue to operating profit"
}
</script>
<script type="application/json" data-bc-chart>
{
"data": "funnel",
"size": [
560,
300
],
"padding": {
"right": 60
},
"transforms": [
{
"type": "funnel",
"field": "users"
}
],
"scales": {
"y": {
"type": "band",
"paddingInner": 0.22
},
"x": {
"type": "linear"
}
},
"guides": [
{
"type": "axis",
"scale": "y"
}
],
"marks": [
{
"type": "rect",
"x": "users0",
"x2": "users1",
"y": "stage"
…