Design an Analytics Dashboard
Problem statement
Design a production analytics dashboard with URL-addressable filters, independent widget loading, freshness labels, query cancellation, accessible charts, and export-safe data contracts.
Asked In
Key Challenges
- ·Coordinating many widgets with shared filters and different freshness requirements
- ·Preventing stale or contradictory metrics from being presented as current
- ·Handling expensive queries with cancellation, caching, and partial loading
- ·Rendering dense charts and tables without blocking the main thread
- ·Making data visualization accessible and keyboard navigable
2-Minute Answer — High-Level TL;DR
Read this before your interview
HLD Interview Focus
I would design the dashboard around a shared filter/query context and independent widget data loaders. The URL stores time range, segments, and dashboard id so the view is shareable. Each widget fetches through a query layer that dedupes requests, cancels stale queries, displays freshness, and can render partial results. Heavy transforms run in a worker or backend, and charts progressively render with skeletons and accessible table fallbacks. The senior-level focus is trust: metric definitions, time zones, stale data, export consistency, and observability for slow or failed widgets.
My Approach: Building the Solution
How to think about this problem
I'll start from a shared dashboard URL for a teammate — filters must round-trip — then design widget boundaries, query signatures, and stale labeling.
Why This Approach?
Most candidates drop eight charts on a page. Strong answers treat each widget as an independent query boundary with a shareable filter URL and explicit freshness — one slow chart must not block the KPI row.
A dashboard is a control room: every panel can refresh independently, but the operator must know which readings are fresh.
Requirements: What Makes a Great Solution?
Clarify scope before designing anything
Requirements Exploration Questions
Ask your interviewer these questions to refine requirements
Who uses the dashboard?
- ·Executives scanning KPIs
- ·Operators investigating anomalies
- ·Analysts exporting data
- ·Embedded customer-facing reports
How fresh must the data be?
- ·Realtime, near-realtime, hourly, daily
- ·Per-widget freshness labels
- ·Late-arriving data and backfills
What interactions matter?
- ·Global filters
- ·Drill-downs
- ·Compare periods
- ·Saved views and exports
How large can datasets get?
- ·Rows per table
- ·Series per chart
- ·Cardinality of filters
- ·Query timeout budgets
What correctness constraints exist?
- ·Timezone handling
- ·Metric definitions
- ·Sampling warnings
- ·Permission-based data masking
What needs to be shareable?
- ·URL state
- ·Dashboard snapshots
- ·Scheduled reports
- ·CSV/PDF exports
Functional Requirements
Must Have — MVP
- ✓Dashboard grid with KPI cards, charts, and tables
- ✓Global filters encoded in the URL
- ✓Per-widget loading, error, empty, and stale states
- ✓Request dedupe, cancellation, and background refresh
- ✓Accessible chart summaries and data table fallbacks
- ✓Export and share-link support
Advanced (If Time Permits)
- +Realtime anomaly overlays
- +Drag-and-drop dashboard layout editor
- +Worker-based chart transforms
- +Saved metric definitions and lineage panel
Non-Functional Requirements
Performance Targets
- ·Initial dashboard shell under 2s
- ·Critical KPI widgets under 1s from warm cache
- ·Filter interaction feedback under 100ms
- ·No main-thread blocks over 50ms during chart rendering
Reliability & Consistency
- ·Cancel stale queries when filters change
- ·Never mix widgets from different filter versions without labeling
- ·Retry transient 5xx/429 responses with backoff
- ·Surface partial dashboard success instead of failing the whole page
Accessibility & Input Support
- ·Keyboard-first flows with visible focus and predictable tab order
- ·Screen-reader announcements for async changes using aria-live where appropriate
- ·Reduced-motion alternatives for animated transitions
- ·Pointer, touch, and keyboard parity for every core action
Security & Privacy
- ·Enforce row/metric permissions on the API, not only in UI
- ·Mask sensitive dimensions in exports
- ·Sanitize saved dashboard names and annotations
Observability
- ·Track Core Web Vitals plus domain-specific interaction latency
- ·Measure API error rate, retry rate, stale-cache usage, and client exceptions
- ·Emit structured events for critical user journeys and abandoned flows
The full solution is part of HelloFrontend Pro
The question above is free to read in full. Upgrade to unlock the interactive workspace and the senior-level walkthrough that go with it.
- Full RADIO-framework walkthrough with architecture diagrams
- Data model, API design, and rendering strategy trade-offs
- Performance, accessibility, and offline sections plus a model answer
Already a member? Log in to open the workspace.