Skip to content

Filter analytics by country when clicking the world map - #444

Open
smehmood wants to merge 1 commit into
masterfrom
smehmood/task-6z613h
Open

Filter analytics by country when clicking the world map#444
smehmood wants to merge 1 commit into
masterfrom
smehmood/task-6z613h

Conversation

@smehmood

@smehmood smehmood commented Jul 1, 2026

Copy link
Copy Markdown

Summary

Clicking a country on the World Map now filters the dashboard down to that country's data, matching the existing behavior of clicking a country row in the Country table.

Changes

  • Added an onClick handler to each map geography in WorldMap.tsx that applies a country=eq.<CODE> URL filter via useNavigation (same mechanism as FilterLink).
  • Clicking the currently-selected country again toggles the filter off.
  • Added a pointer cursor on hover for interactive countries (Antarctica / unknown regions stay non-interactive).

Verification

Clicked the United States on the map — a "Country is United States" filter chip appeared and all metrics updated to US-only figures (Visitors 8.22k → 3.79k, matching the country table).

Screenshots

The world map (click a country to filter):

After clicking the United States — dashboard filtered to US data:

🌒 Run on Niteshift: View Task

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Run-on: Niteshift
@mesa-dot-dev

mesa-dot-dev Bot commented Jul 1, 2026

Copy link
Copy Markdown

You do not have enough credits to review this pull request. Please purchase more credits to continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant