Skip to main content
100%

Representing Data using React and D3

✓ Published1🌍 Public
DDhvanil Vaghasiya
Last edited Jan 31, 2023
Created on Jan 30, 2023

This example displays CSS named colors as a radial burst, with each color occupying an equal wedge of a pie chart. It uses React hooks (`useState` and `useEffect`) to load a CSV of color data via D3's `csv` utility, then renders the chart as SVG paths. The pie layout is computed with `d3.pie()` and each arc is drawn using `d3.arc()` with an inner radius of zero. The fill for each path comes directly from the `RGB hex value` column in the dataset.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities, and uses React to render the data as a radial burst!

MIT Licensed

Similar vizzes