Skip to main content
100%

d3.js v4 - Zoomable treemap

✓ Published0🌍 Public
SSigfried
Last edited Jun 1, 2018
Created on Jun 1, 2018

This zoomable treemap visualizes the provisional income budget for the city of Rome across three years (2016–2018), using nested rectangles to represent hierarchical budget categories. Built with D3 v4, it employs `d3.treemap`, `d3.hierarchy`, and linear scales for layout, with SVG rendering and animated transitions on zoom. Breadcrumbs in the navigation bar track the current hierarchy level, while tooltips appear via SVG title elements. The code supports dynamic width for mobile devices and wraps text labels within cells; it omits colors entirely, relying on structure and labels for readability.

AI-generated description

A zoomable treemap, with dynamic width for mobile, and wrapped texts.

The code has been ported to D3v4, and humbly improved from the original Jacques Jahnichen's Block.

The data visualizes the income provisional budget for the city of Rome, as of year 2016.

This gist is part of the OpenBilanci project.

Modifications and improvements include: colors are not used, breadcrumbs have been added to the navigation bar, titles have been added to the svg rects (popover effect on some browser)

forked from <a href='http://bl.ocks.org/guglielmo/'>guglielmo</a>'s block: <a href='http://bl.ocks.org/guglielmo/f28d653dce899affeec6e34a733325e4'>d3.js v4 - Zoomable treemap</a>

gpl-3.0 Licensed

Similar vizzes