Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Ep20 Visualizing with React D3 tryArc refactor

Public visualization

Viewing a saved revision (read-only)

f1e8313a0f8445de8e6b34c5a80c71a3

Ep20 Visualizing with React D3 tryArc refactor

0 stars1🌍 Public
GGordon Yang
Last edited Apr 7, 2021
Created on Apr 7, 2021

This example visualizes CSS named colors as a circular pie chart, with each wedge representing one color from a CSV dataset loaded via `d3.csv`. The React `App` component fetches the data asynchronously and renders SVG paths using `d3.arc` to compute the wedge geometries based on evenly divided start and end angles. The chart sits centered within a 960×500 SVG canvas, with each path filled by the color’s hex value from the data.

AI-generated description

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

See also React Starter.