Skip to main content
100%

D3 Donut Chart

✓ Published0🌍 Public
JJack Elsey
Last edited May 21, 2021
Created on May 14, 2021

This D3 Donut Chart visualizes categorical sales data loaded from a remote CSV file, rendering each category as a colored arc segment around a hollow center. The chart uses React hooks (`useState`, `useEffect`) to fetch and store the data, then builds the visualization with D3's `pie()` and `arc()` functions inside an SVG element. Each path is generated by the `pieArc` generator with an inner radius of 100 and outer radius of 200, with fill colors assigned from the dataset’s `color` field. The view displays a simple loading state while the CSV is being fetched.

AI-generated description
MIT Licensed

Similar vizzes