Skip to main content
100%

Hierarchical Bar Chart

✓ Published0🌍 Public
LLucioAmorim
Last edited Feb 26, 2018
Created on Feb 26, 2018

This example shows a hierarchical bar chart exploring a JSON dataset of the Flare visualization library’s file sizes. Each blue bar encodes the total bytes for a folder and its subfolders, with animation on click. Clicking a bar drills down into that folder, while clicking the background returns to the parent. The implementation relies on `d3.layout.partition` for recursion, an ordinal color scale for parent/child bars, and `select.transition` with staggered delays to animate the entering and exiting bars along the x-axis.

AI-generated description

This bar chart visualizes hierarchical data using D3. Each blue bar represents a folder, whose length encodes the total size of all files in that folder (and all subfolders). Clicking on a bar dives into that folder, while clicking on the background bubbles back up to the parent folder. The effect is similar to a zoomable partition layout, though in a more conventional display.

forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/1283663'>Hierarchical Bar Chart</a>

forked from <a href='http://bl.ocks.org/anonymous/'>anonymous</a>'s block: <a href='http://bl.ocks.org/anonymous/16ef3a4b5c454c94a245d47c921f0322'>Hierarchical Bar Chart</a>

gpl-3.0 Licensed

Similar vizzes