::SPARKLINE
Minimal trend line (no axes); a list() column in a table; on a map: a mini chart in each feature’s tooltip.
Also spelled: ::SPARK
The data it needs
Section titled “The data it needs”In a table: one row per item with a list(v ORDER BY t) column (a KPI tile takes the same list under its ::METRIC). On a map it becomes a mini chart in each feature’s tooltip.
SELECT store ::TABLE, trend AS "Last 4 weeks" ::SPARKLINEFROM (SELECT store, list(v ORDER BY t) AS trend FROM (VALUES ('Berlin',1,5),('Berlin',2,7),('Berlin',3,6),('Berlin',4,9),('Hamburg',1,4),('Hamburg',2,3),('Hamburg',3,5),('Hamburg',4,4)) t(store, t, v) GROUP BY store);In an example
Section titled “In an example”From Which chart fits which question? — open it in the builder ↗:
SELECT 'Sparklines are word-sized trend lines — ideal as small multiples in a table or grid. One **::SPARKLINE** per series; here revenue plus three activity series side by side.'::MARKDOWN, 'What this shows'::TITLEAlso in: Which products and stores are on plan? · Where will stock run short, and can we trust the plan? · What should we order this week to sell the most? · How reliable are our suppliers, and what does it cost us in stock? · Where do our deliveries and customers cluster, and which regions are underserved? · Where does our supply chain amplify demand, and what would stabilise it?
Related
Section titled “Related”::LINECHART · ::LINECHART_PERCENT · ::STEP · ::SMOOTH · ::AREACHART · ::AREACHART_STACKED · ::CANDLESTICK · ::SPARKBAR