Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Visualizing data with React and D3

Public visualization

Visualizing data with React and D3

0 stars0🌍 Public
CCaroline Ghisolfi
Last edited Dec 18, 2022
Created on Dec 18, 2022

This example uses React and D3 v7 to render a color wheel from a CSV of named CSS colors. The code loads the dataset with `d3.csv`, computes the pie layout with `d3.pie`, and draws arcs with `d3.arc`, mapping each color’s hex value to its slice’s fill. The SVG is generated declaratively inside a React component, using `useState` and `useEffect` to manage asynchronous data fetching, with a loading state displayed before the visualization appears.

AI-generated description

Visualizing data with React & D3 https://www.youtube.com/watch?v=2LhoCfjm8R4

Comments

Sign in to join the discussion.

MIT Licensed