Religion chart shows high-level religions once; count columns align
Some checks are pending
build-gate / build (push) Waiting to run

RELIGION ROLLUP. "It should not mention Ethnoreligion and Islam multiple
times -- just the high-level religions." The rollup already existed as the
religion_family facet; the donut was simply pointed at the fine-grained
religion facet. One word moves it. Measured after: Hinduism 693, Islam 650,
Ethnoreligion 610, Buddhism 83 -- each named once. The full Sunni/Folk
breakdown still lives in the facet rail's Religion tree. religion_family is
dashboardOnly by design, so a slice click narrows the dashboard but not the
grid below -- documented, and the right trade for a glanceable donut.

COUNT COLUMN. Uniform, right-justified, immovable, in BOTH donut legends:
min-width 3.4em + text-align right on the shared .rd-li rule, on top of the
existing sticky right:0 and tabular-nums. Measured: every count 42px wide,
right-aligned, digits in one scannable column.

Known nit, deliberately left: Religion can show two "Other" rows -- one is
a real family label, one is the topN overflow bucket. Worth a rename of the
overflow bucket later, not a silent merge of different things.
This commit is contained in:
doxa-maps-88655c70 2026-09-23 21:20:59 +00:00
parent 64f1f2bf7b
commit 11bd2bcd5c
9 changed files with 32 additions and 11 deletions

View file

@ -402,7 +402,16 @@ export default {
// ── charts ── (DashboardChartsRail)
charts: [
{ id: 'religion', type: 'donut', facet: 'religion', title: 'Religion', topN: 8 },
// ★ HIGH-LEVEL RELIGIONS ONLY (Driver 2026-09-23: "it should not mention Ethnoreligion and
// Islam multiple times, just once -- just the high-level religions, not broken down into
// smaller categories"). The rollup ALREADY EXISTED as the religion_family facet ("Islam",
// "Hinduism", "Ethnoreligion" -- one row each); the chart was simply pointed at the
// fine-grained `religion` facet ("Islam - Sunni", "Islam - Folk", ...). One word moves it.
// religion_family is dashboardOnly by design (a derived value no row field carries), so a
// slice click narrows the DASHBOARD but not the grid below -- documented behaviour, and for
// a glanceable donut that is the right trade. The full breakdown still lives in the facet
// rail's Religion tree for anyone who needs Sunni vs Folk.
{ id: 'religion', type: 'donut', facet: 'religion_family', title: 'Religion', topN: 8 },
{ id: 'region', type: 'donut', facet: 'wagf_region', title: 'Region', topN: 9 },
{ id: 'country', type: 'bar', facet: 'country_code', title: 'Top countries', topN: 12 },
],

View file

@ -219,7 +219,17 @@ useShadowStyles(`
Background is --rd-panel (the card's own surface) so the pin matches its host rather than
assuming white; the card is #fff today but a host that re-skins the panel should not get a
white rectangle floating on a tinted card. */
/* ★ THE COUNT COLUMN IS UNIFORM, RIGHT-JUSTIFIED AND IMMOVABLE (Driver 2026-09-23: "set the
number column to be justified right, same width, uniform, immovable... so it is easier to
use -- and the same goes for the region chart"). One fixed width for every row means the
digits align into a scannable column instead of each number sitting wherever its label ended;
right-justified plus the existing tabular-nums makes magnitudes comparable at a glance (541
visibly longer than 72). 3.4em clears the widest live value (1,309 in the region chart) with
a little air. sticky right:0 (from the frozen-column fix) is what makes it immovable while the
label scrolls beneath. Both donut legends share .rd-li, so religion and region get this from
the one rule -- which is exactly why it lives here and not per-chart. */
.rd-li b{ position:sticky; right:0; z-index:1; margin-left:auto;
min-width:3.4em; text-align:right;
background:var(--rd-panel, #fff); box-shadow:-6px 0 6px -4px var(--rd-panel, #fff);
color:var(--rd-muted, #6d766e); font-variant-numeric:tabular-nums; flex:0 0 auto;
padding-left:6px; margin-top:1px; }

File diff suppressed because one or more lines are too long

View file

@ -40,7 +40,7 @@
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
<!-- Bundle IIFE — registers the <dashboard-plus-grid> custom element. -->
<script src="../../dashboard-plus-grid.js" integrity="sha384-KQJ+KPbw0ArozOVVrdo7yMZuQPbJ+FltOb9T6eiyxXlLZLp6jRS6Yq8rddSVW2jg" crossorigin="anonymous"></script>
<script src="../../dashboard-plus-grid.js" integrity="sha384-mjoKldgQV37Bf/ayWxCbfat2W4qexMeQZ75JVFXEvxH+UVoldAJY6DKoeIo3Q9oe" crossorigin="anonymous"></script>
<script>
// Mapbox token resolution — the A3 ladder, in precedence order:

View file

@ -40,7 +40,7 @@
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
<!-- Bundle IIFE — registers the <dashboard-plus-grid> custom element. -->
<script src="../dashboard-plus-grid.js" integrity="sha384-KQJ+KPbw0ArozOVVrdo7yMZuQPbJ+FltOb9T6eiyxXlLZLp6jRS6Yq8rddSVW2jg" crossorigin="anonymous"></script>
<script src="../dashboard-plus-grid.js" integrity="sha384-mjoKldgQV37Bf/ayWxCbfat2W4qexMeQZ75JVFXEvxH+UVoldAJY6DKoeIo3Q9oe" crossorigin="anonymous"></script>
<script>
// Mapbox token resolution — the A3 ladder, in precedence order:

File diff suppressed because one or more lines are too long

View file

@ -193,7 +193,7 @@
"bundle": "dashboard-plus-grid",
"scriptUrl": "./dashboard-plus-grid/dashboard-plus-grid.js",
"output": "doxa-maps/dashboard-plus-grid/dashboard-plus-grid.js",
"integrity": "sha384-KQJ+KPbw0ArozOVVrdo7yMZuQPbJ+FltOb9T6eiyxXlLZLp6jRS6Yq8rddSVW2jg",
"integrity": "sha384-mjoKldgQV37Bf/ayWxCbfat2W4qexMeQZ75JVFXEvxH+UVoldAJY6DKoeIo3Q9oe",
"elements": [
"dashboard-plus-grid"
],
@ -213,7 +213,7 @@
"scriptUrl": "./dashboard-plus-grid/dashboard-plus-grid.js",
"embed": {
"iframe": "<iframe src=\"./dashboard-plus-grid/dashboard-plus-grid/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./dashboard-plus-grid/dashboard-plus-grid.js\" integrity=\"sha384-KQJ+KPbw0ArozOVVrdo7yMZuQPbJ+FltOb9T6eiyxXlLZLp6jRS6Yq8rddSVW2jg\" crossorigin=\"anonymous\"></script>\n<dashboard-plus-grid profile-config='{\"profile\":\"dashboard-plus-grid\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></dashboard-plus-grid>"
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./dashboard-plus-grid/dashboard-plus-grid.js\" integrity=\"sha384-mjoKldgQV37Bf/ayWxCbfat2W4qexMeQZ75JVFXEvxH+UVoldAJY6DKoeIo3Q9oe\" crossorigin=\"anonymous\"></script>\n<dashboard-plus-grid profile-config='{\"profile\":\"dashboard-plus-grid\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></dashboard-plus-grid>"
},
"instances": [
{
@ -878,7 +878,7 @@
"bundle": "research-dashboard",
"scriptUrl": "./research-dashboard/research-dashboard.js",
"output": "doxa-maps/research-dashboard/research-dashboard.js",
"integrity": "sha384-j62ALJiNLLvqb+spjlhYbsZiKP2/44R7G5Vfho5tPmyBPa4XvNACDK+SM2CouqIu",
"integrity": "sha384-VKxEQfyEpwhp0p8DYoYbfuSYSFXlaB8jNuU/kX7PqoWL7v5wytnaBiJ6nw1/LZ5k",
"elements": [
"research-dashboard-map"
],
@ -894,7 +894,7 @@
"scriptUrl": "./research-dashboard/research-dashboard.js",
"embed": {
"iframe": "<iframe src=\"./research-dashboard/research-dashboard/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./research-dashboard/research-dashboard.js\" integrity=\"sha384-j62ALJiNLLvqb+spjlhYbsZiKP2/44R7G5Vfho5tPmyBPa4XvNACDK+SM2CouqIu\" crossorigin=\"anonymous\"></script>\n<research-dashboard-map profile-config='{\"profile\":\"research-dashboard\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></research-dashboard-map>"
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./research-dashboard/research-dashboard.js\" integrity=\"sha384-VKxEQfyEpwhp0p8DYoYbfuSYSFXlaB8jNuU/kX7PqoWL7v5wytnaBiJ6nw1/LZ5k\" crossorigin=\"anonymous\"></script>\n<research-dashboard-map profile-config='{\"profile\":\"research-dashboard\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></research-dashboard-map>"
},
"bundle": "research-dashboard"
}

File diff suppressed because one or more lines are too long

View file

@ -29,7 +29,7 @@
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
<!-- Bundle IIFE — registers the <research-dashboard-map> custom element. -->
<script src="../research-dashboard.js" integrity="sha384-j62ALJiNLLvqb+spjlhYbsZiKP2/44R7G5Vfho5tPmyBPa4XvNACDK+SM2CouqIu" crossorigin="anonymous"></script>
<script src="../research-dashboard.js" integrity="sha384-VKxEQfyEpwhp0p8DYoYbfuSYSFXlaB8jNuU/kX7PqoWL7v5wytnaBiJ6nw1/LZ5k" crossorigin="anonymous"></script>
<script>
// Mapbox token resolution — the A3 ladder, in precedence order: