Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

CodePen - D3 TreeMap

Public visualization

Viewing a saved revision (read-only)

24581592eb5b4e578d316df89d238557

CodePen - D3 TreeMap

0 stars1🌍 Public
VVickoh
Last edited Jun 29, 2023
Created on Jun 29, 2023
Forked from HTML Starter

This interactive treemap visualizes box office revenue for top-grossing movies, hierarchically grouped by genre. Users can click any tile to zoom into that category, revealing individual film titles, their genre, and revenue values via a tooltip on hover. Built with D3 v5, it uses `d3.hierarchy` and `d3.treemap` to compute the layout, with `d3.scaleOrdinal` assigning colors and `d3.schemeCategory10` for the palette. The code fetches movie data from a local JSON file and animates transitions between zoom levels with `d3.transition` and `d3.easeCubicOut`.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.