Skip to main content
100%

Rendering Data with React

✓ Published1🌍 Public
Ddleoenri
Last edited Apr 20, 2022
Created on Apr 20, 2022

This example renders a donut-shaped pie chart from a CSV of CSS named colors, using React to structure the component and D3’s `pie` and `arc` generators to compute the slices. Each slice is drawn as an SVG `<path>` filled with the corresponding hex value from the dataset. The chart is centered with a D3 arc outer radius matching the SVG width, and a loading message appears until the data is fetched asynchronously.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes