Skip to main content
100%

Basic Tree Map

✓ Published0🌍 Public
MMounikaBeerelly
Last edited Jun 9, 2020
Created on Jun 9, 2020

This visualization shows a hierarchical tree map of world regions and countries, with the root labeled "World" branching into continents and subregions before reaching individual nations. The layout positions nodes horizontally, with parent-child relationships drawn as curved links using the `linkHorizontal` path generator. The visualization loads data from a local JSON file and uses D3 v5's `tree` and `hierarchy` functions to compute the layout, while SVG elements are selected and managed with `select` and `selectAll`.

AI-generated description
  1. Constructing a node-link tree visualization
  2. adding text labels to the nodes
  3. using the margin convention
  4. tweaking label alignment and size
  5. panning and zooming
  6. using a custom font

// d3-heirarchy package

MIT Licensed

Similar vizzes