Skip to main content
100%

React Starter

✓ Published0🌍 Public
Ddavmaz
Last edited Nov 5, 2020
Created on Nov 5, 2020
Forked from React Starter

This example renders a hierarchical tree diagram as an interactive SVG visualization. Built with React and D3.js, the code uses the `hierarchy()` and `tree()` functions to process a JSON data structure, preparing it for layout before the `linkVertical()` path generator draws the connecting lines between nodes. The visualization displays the tree’s nodes as text labels, with font size varying by depth, and uses the `select()` API to append paths and text elements to the canvas. Data is fetched asynchronously from a local JSON file served in a public directory.

AI-generated description

Forked from React Starter code. This code uses function descend(start) to display the return value from: const root = hierarchy(data); in file Process.js The 'main' app is in main.js and loads './first.json' which is usually stored in a public directory and served with http-server --watch first.json

MIT Licensed

Similar vizzes