Skip to main content
Public

Share visualization

Loading preview…

World countries tree

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

World countries tree

0
Ddata-inside
Last edited Nov 30, 2020
Created on Nov 30, 2020

This visualization presents a hierarchical tree of world countries, organized by continent and subregion, using a left-to-right layout. The code employs D3 v5’s `tree` and `hierarchy` functions to compute node positions, with `linkHorizontal` generating curved paths between parent and child nodes. Each country name is rendered as SVG text, with font size decreasing by depth level, on a zoomable canvas via D3’s `zoom` behavior. The data is loaded from a local JSON file, and the styling uses a Google Font (`Nerko One`) with a white text shadow for legibility.

AI-generated description

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

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed