Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Rendering Data with React & D3

Public visualization

Rendering Data with React & D3

0 stars1🌍 Public
11tang
Last edited Apr 10, 2021
Created on Apr 10, 2021

This example shows a color wheel of CSS named colors loaded from a CSV file via `d3.csv`, with each slice colored by its hex value. It combines React’s `useState` and `useEffect` hooks to fetch data asynchronously, then renders an SVG using `d3.pie` and `d3.arc` to compute the pie geometry within a React component. The `arc` uses an inner radius of zero and an outer radius equal to the SVG width, producing a full circular diagram.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities, and uses React to render the data.

Comments

Sign in to join the discussion.

MIT Licensed