Skip to main content
Public

Share visualization

Loading preview…

Fork of HTML Starter

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

Fork of HTML Starter

0 stars0Public
FFarhaan Qazi
Last edited Mar 7, 2023
Created on Mar 7, 2023
Forked from HTML Starter

This example demonstrates how to traverse and render a hierarchical tree structure using D3.js’s `d3.hierarchy` API. It visualizes nested data objects as a series of stacked, blue-bordered `div` elements, where each level of nesting corresponds to a deeper layer of the tree. The code builds the hierarchy from a static raw JavaScript object, then uses `d3.select` and `.append()` to create the DOM nodes, with each element’s text set to the node’s name. The console logs the depth and name of each visited node, illustrating the traversal order.

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