Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Loading Data with React & D3

Public visualization

Fork of Loading Data with React & D3

0 stars0🌍 Public
TTina Nemati
Last edited May 29, 2023
Created on May 29, 2023

This example displays a pie chart of CSS named colors, with each slice filled using its corresponding RGB hex value from the loaded dataset. The visualization uses React state and the `useEffect` hook to asynchronously fetch CSV data via `d3.csv`, then renders the chart as SVG paths. The pie layout is generated with `d3.pie()` and sectors are drawn using `d3.arc()`, with all geometry centered within a 960×500 viewport.

AI-generated description

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

Comments

Sign in to join the discussion.

MIT Licensed