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


Stacked areas (by CATEGORY).
Also spelled: ::AREA_STACKED, ::STACKED_AREA
The data it needs
Section titled “The data it needs”One row per x and ::CATEGORY; the areas stack to the total.
SELECT m ::XAXIS, s ::CATEGORY, (CASE s WHEN 'Web' THEN 40 ELSE 25 END) + 4 * month(m) ::AREACHART_STACKEDFROM range(DATE '2026-01-01', DATE '2026-07-01', INTERVAL 1 MONTH) r(m), (VALUES ('Web'), ('Store')) c(s);In an example
Section titled “In an example”From How is ACME selling across regions and channels? — open it in the builder ↗:
SELECT date_trunc('month', day)::DATE ::XAXIS, region ::CATEGORY, sum(revenue) / 1e6 ::AREACHART_STACKED, '$'::YFORMAT, 'Monthly revenue by region ($M), two years'::TITLEFROM acme_orders WHERE list_contains(getvariable('channel'), channel) GROUP BY ALL ORDER BY 1, 2Related
Section titled “Related”::LINECHART · ::LINECHART_PERCENT · ::STEP · ::SMOOTH · ::AREACHART · ::CANDLESTICK · ::SPARKLINE · ::SPARKBAR