Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Rendering Data using React

Public visualization

Rendering Data using React

0 stars1🌍 Public
AAnmol Gupta
Last edited Jul 7, 2021
Created on Jul 7, 2021
Forked from CSV

This example renders CSS color names from an external CSV file as a full donut chart using React and D3. The visualization shows each color name as a slice of an SVG pie chart, with the slice fill matching the hex value of that color. The code uses React hooks (`useState`, `useEffect`) to load the data asynchronously, and D3 v5’s `csv`, `pie`, and `arc` generators to compute and draw the arc paths. ReactDOM renders the resulting SVG directly to the page, with the chart centered in a 960×500 viewport.

AI-generated description

Mouse Follower

Comments

Sign in to join the discussion.

MIT Licensed