Choropleth: darken greyscale bin 1 so low-count countries read as data
Some checks are pending
build-gate / build (push) Waiting to run

Bangladesh (3 groups) WAS rendering -- queryRenderedFeatures returned
the BGD polygon -- but painted #e8e8e8 against the #f3f3f1 no-data
surface: a 1.06 contrast ratio at 0.78 opacity, pixel-identical to an
empty country. Bin 1 is now #c9c9c9: the ramp's first step must be
separated from NO-DATA at least as clearly as from bin 2. Legend
swatch follows automatically (derived from BIN_COLORS).
This commit is contained in:
doxa-maps-88655c70 2026-09-23 22:47:14 +00:00
parent 3ca6912381
commit e3a82afdc4
8 changed files with 18 additions and 11 deletions

View file

@ -489,7 +489,14 @@ function setLiveResize(on) {
const BIN_COLORS = (() => {
const RAMP_PRESETS = {
'heartbeat-red': ['#f4cec4', '#ecaea1', '#e08678', '#ce544b', '#b10010'],
greyscale: ['#e8e8e8', '#a9a9a9', '#6f6f6f', '#3a3a3a', '#060606'],
// ★ BIN 1 DARKENED #e8e8e8 -> #c9c9c9 (Driver 2026-09-23: "bangladesh is not showing up as a
// polygon"). It WAS rendering -- queryRenderedFeatures returned the BGD polygon painted
// #e8e8e8 -- but against the #f3f3f1 no-data surface that is a 1.06 contrast ratio at 0.78
// opacity: a 1-4-group country was pixel-identical to an empty one. The ramp's first step
// must be separated from NO-DATA at least as clearly as from bin 2, or the lowest bin
// silently reads as "not in the data" (ColorBrewer sequential ramps assume no competing
// no-data fill on the same canvas; when there is one, start the ramp a step darker).
greyscale: ['#c9c9c9', '#a9a9a9', '#6f6f6f', '#3a3a3a', '#060606'],
}
return RAMP_PRESETS[cfg.map?.colorRamp] || RAMP_PRESETS['heartbeat-red']
})()

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-kWgKDDLAPb/QSr/N46AYiRuZ8Yd0Xhe5lzudaNwvL0bLYY6og5iBvkL2T5rghmIv" crossorigin="anonymous"></script>
<script src="../../dashboard-plus-grid.js" integrity="sha384-Rju6AGidwHjL95WlR0ArDCOpnhsH64tyaa63FBLCA5WAxmQGLNokKWLDml8cTJYg" 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-kWgKDDLAPb/QSr/N46AYiRuZ8Yd0Xhe5lzudaNwvL0bLYY6og5iBvkL2T5rghmIv" crossorigin="anonymous"></script>
<script src="../dashboard-plus-grid.js" integrity="sha384-Rju6AGidwHjL95WlR0ArDCOpnhsH64tyaa63FBLCA5WAxmQGLNokKWLDml8cTJYg" 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-kWgKDDLAPb/QSr/N46AYiRuZ8Yd0Xhe5lzudaNwvL0bLYY6og5iBvkL2T5rghmIv",
"integrity": "sha384-Rju6AGidwHjL95WlR0ArDCOpnhsH64tyaa63FBLCA5WAxmQGLNokKWLDml8cTJYg",
"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-kWgKDDLAPb/QSr/N46AYiRuZ8Yd0Xhe5lzudaNwvL0bLYY6og5iBvkL2T5rghmIv\" 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-Rju6AGidwHjL95WlR0ArDCOpnhsH64tyaa63FBLCA5WAxmQGLNokKWLDml8cTJYg\" 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-4GrX/SX6xEZEROiYe/5vxmI7TRAFZHMHZlYbDGYZtgO0VSzIzr5uT3uk9pT7ZL2Y",
"integrity": "sha384-Ve2bU0KMKMWO+Df2PPUWOlW6AYrk3FGZuOjOCjK5ltVbrJh2a5LOp2ofT7QuO0AM",
"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-4GrX/SX6xEZEROiYe/5vxmI7TRAFZHMHZlYbDGYZtgO0VSzIzr5uT3uk9pT7ZL2Y\" 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-Ve2bU0KMKMWO+Df2PPUWOlW6AYrk3FGZuOjOCjK5ltVbrJh2a5LOp2ofT7QuO0AM\" 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-4GrX/SX6xEZEROiYe/5vxmI7TRAFZHMHZlYbDGYZtgO0VSzIzr5uT3uk9pT7ZL2Y" crossorigin="anonymous"></script>
<script src="../research-dashboard.js" integrity="sha384-Ve2bU0KMKMWO+Df2PPUWOlW6AYrk3FGZuOjOCjK5ltVbrJh2a5LOp2ofT7QuO0AM" crossorigin="anonymous"></script>
<script>
// Mapbox token resolution — the A3 ladder, in precedence order: