HAHS.
Back to Catalog

Drill-down / Roll-up

interaction

Also known as: hierarchical navigation, expand collapse, level of detail, drill through

Show hierarchyEnable explorationProvide detailFilter / focus HierarchicalCategoricalTemporalNumerical

Description

Drill-down and roll-up are complementary navigation techniques for hierarchical data. Drill-down lets the user click on an aggregate element to expand it, replacing the current view with a more detailed breakdown of that element’s children. Roll-up reverses the operation, moving back up the hierarchy to a higher level of aggregation. This vertical navigation through data hierarchies is one of the most natural ways to explore data that is organized in levels — geography (country -> state -> city), time (year -> quarter -> month -> day), product (department -> category -> item), or organization (company -> division -> team).

The pattern is rooted in OLAP (Online Analytical Processing) concepts from business intelligence, where drill-down along dimensions of a data cube is a primary analytical operation. In visualization, the technique gained prominence through zoomable treemaps (Blanch & Lecolinet, 2007) and interactive dashboards. The critical design challenge is maintaining context during the transition: when the user drills into “Electronics,” they need to know they are now seeing a subset, and they need a clear path back to the parent level.

Brehmer and Munzner (2013) classify this as a “navigate” action that changes the level of detail in the visualization. The animated transition between levels is crucial — it provides continuity, helping the user understand that the detailed view is contained within the aggregate they clicked. Breadcrumb trails, back buttons, and animated zoom transitions all serve to maintain the user’s sense of location within the hierarchy.

Drill Down — try it yourself

When to Use

  • When the data has a natural hierarchical structure (geographic, temporal, organizational, taxonomic).
  • When showing all levels simultaneously would create an overwhelming amount of visual clutter.
  • When the user’s task involves understanding composition at different levels of granularity.
  • In dashboards where the initial view shows high-level KPIs and the user needs to investigate anomalies by drilling into contributing factors.
  • When treemaps, sunburst diagrams, or other hierarchical visualizations are the primary chart type.

When NOT to Use

  • When the data is flat (no hierarchy) — use filter or sort instead.
  • When the hierarchy has only two levels — a grouped or stacked bar chart can show both levels simultaneously.
  • When context from the parent level must remain visible during exploration — use focus+context or overview+detail instead.
  • When the drill-down path is more than 4-5 levels deep, which can cause the user to lose their bearings.
  • When animation between levels would be too slow or disorienting due to the volume of elements.

How It Works

  1. The user sees an aggregated view — for example, a bar chart of sales by region (North, South, East, West).
  2. The user clicks on one aggregate (e.g., the “North” bar), signaling intent to drill down.
  3. The system animates a transition from the aggregate view to a detailed view showing the children of the selected item (e.g., individual states within North).
  4. A breadcrumb trail or back button appears, showing the navigation path (All > North) and allowing roll-up.
  5. The user can continue drilling into deeper levels (All > North > New York > NYC).
  6. To roll up, the user clicks the breadcrumb, the back button, or an “up” navigation element. The view animates back to the parent level.
  7. Optionally, a “drill-through” variant opens a separate detail view (a table, a report) rather than changing the chart.

Variations

  • In-place drill-down: The chart transforms in place. The bar chart of regions becomes a bar chart of states. Most common in dashboards.
  • Zoomable drill-down: The clicked element expands visually, and the view zooms into it (zoomable treemaps, sunburst diagrams).
  • Side-panel drill-down: Clicking an aggregate opens a detailed breakdown in an adjacent panel without changing the main view.
  • Temporal drill-down: Clicking a year bar expands to quarterly, then monthly, then daily views of the same metric.
  • Drill-through to table: Clicking an aggregate opens a table of the individual records that compose it — common in BI tools.
  • Animated breadcrumb: The breadcrumb trail animates as levels are added/removed, reinforcing the hierarchical navigation.

Code Reference

// Conceptual drill-down on a bar chart
let currentLevel = "region"; // region -> state -> city
let breadcrumb = ["All"];

function renderBars(groupKey) {
  const grouped = d3.rollup(filtered, v => d3.sum(v, d => d.sales), d => d[groupKey]);
  // ... render bars from grouped data ...
  svg.selectAll("rect").on("click", (event, [key]) => {
    filtered = filtered.filter(d => d[groupKey] === key);
    breadcrumb.push(key);
    currentLevel = nextLevel(currentLevel);
    renderBars(currentLevel);
  });
}