Skip to main content
100%

Visualizing Data with React & D3

✓ Published1🌍 Public
MMGamboa
Last edited May 5, 2021
Created on May 5, 2021

This example displays a pie chart of CSS named colors, loaded from a CSV file. Each slice represents a color, and its fill is the color’s hex value. The code uses D3 v6 utilities `d3.csv` to fetch the data and `d3.pie` along with `d3.arc` to compute the pie geometry. React manages the application state, initially showing a “Loading…” message while the CSV is fetched, then rendering the chart as SVG paths.

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.

MIT Licensed

Similar vizzes