You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by rb...@apache.org on 2026/03/12 14:23:13 UTC
(superset) branch rebenitez1802/fix/world-map-fill-color-fallback created (now 63af3c81836)
This is an automated email from the ASF dual-hosted git repository.
rbenitez pushed a change to branch rebenitez1802/fix/world-map-fill-color-fallback
in repository https://gitbox.apache.org/repos/asf/superset.git
at 63af3c81836 fix(world-map): add fallback fill color when colorFn returns null
This branch includes the following new commits:
new 63af3c81836 fix(world-map): add fallback fill color when colorFn returns null
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(superset) 01/01: fix(world-map): add fallback fill color when colorFn returns null
Posted by rb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rbenitez pushed a commit to branch rebenitez1802/fix/world-map-fill-color-fallback
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 63af3c81836190f3d62da98d7a9724fb3d8d85fb
Author: Rafael Benitez <re...@gmail.com>
AuthorDate: Thu Mar 12 11:22:50 2026 -0300
fix(world-map): add fallback fill color when colorFn returns null
When using metric-based coloring, `colorFn(d.m1)` can return null/undefined
for certain data values, causing countries to render without a fill color.
This adds a nullish coalescing fallback to `theme.colorBorder` to ensure
countries always have a visible fill color, matching the existing default
fill behavior used elsewhere in the component.
Co-Authored-By: Claude Opus 4.6 <no...@anthropic.com>
---
superset-frontend/plugins/legacy-plugin-chart-world-map/src/WorldMap.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/superset-frontend/plugins/legacy-plugin-chart-world-map/src/WorldMap.ts b/superset-frontend/plugins/legacy-plugin-chart-world-map/src/WorldMap.ts
index e6c7bc2679d..59d103fc8e5 100644
--- a/superset-frontend/plugins/legacy-plugin-chart-world-map/src/WorldMap.ts
+++ b/superset-frontend/plugins/legacy-plugin-chart-world-map/src/WorldMap.ts
@@ -157,7 +157,7 @@ function WorldMap(element: HTMLElement, props: WorldMapProps): void {
processedData = filteredData.map(d => ({
...d,
radius: radiusScale(Math.sqrt(d.m2)),
- fillColor: colorFn(d.m1),
+ fillColor: colorFn(d.m1) ?? theme.colorBorder,
}));
}