::BARCHART_STACKED
Dashboards: browser · CLI · servers
Community extension: anofox_render


Stacked bars (by CATEGORY).
Also spelled: ::BAR_STACKED, ::STACKED_BAR
The data it needs
Section titled “The data it needs”One row per segment: ::XAXIS and ::CATEGORY; the segments of an x stack to its total.
SELECT region ::XAXIS, channel ::CATEGORY, revenue ::BARCHART_STACKEDFROM (VALUES ('North','Web',120),('North','Store',80),('South','Web',90),('South','Store',110)) t(region, channel, revenue);In an example
Section titled “In an example”From Where do our sessions come from? — open it in the builder ↗:
SELECT '**How it works:** every panel is a SQL query whose columns are tagged with `::ROLE` casts — `::XAXIS`, `::CATEGORY`, a chart kind like `::BARCHART_STACKED`, `::PIE`, `::LINECHART`, `::TABLE`, or a KPI (`::COMPACT`/`::METRIC`). Un-annotated statements (the `CREATE TABLE`) are setup. **Click a pie slice or a table row** — the KPI strip filters via `getvariable(''selected'')`.'::MARKDOWN, 'What this shows'::TITLEAlso in: Which chart fits which question? · How do filters change what we see? · Which region, country and city bring the revenue? · How is revenue split by week and channel? · Where will stock run short, and can we trust the plan? · Where does our supply chain amplify demand, and what would stabilise it?
Related
Section titled “Related”::BARCHART · ::BARCHART_PERCENT · ::BARCHART_STACKED_PERCENT · ::WATERFALL · ::BULLET · ::FUNNEL · ::PARETO · ::GANTT