Skip to main content
100%

Donut Example Re-imagined 2 Final Week

✓ Published0🌍 Public
PPeter Maida
Last edited Nov 3, 2020
Created on Nov 3, 2020

This example shows an interactive pie chart built with React and D3 v5 that visualizes firearm, suicide, and alcohol-related death data from a CSV file. The chart displays a semi-circular arc for the mouth, while the pie slices represent data grouped by sex, with distinct colors from the `d3.schemeCategory10` palette. The code uses `d3.pie()` for the arc generation and `d3.arc()` for rendering, with a button to trigger data transformations. The visualization runs entirely in SVG, with data loaded asynchronously via `d3.csv` and rendered through React hooks and the D3 selection API.

AI-generated description

Animated Pie chart taken from this website.

MIT Licensed

Similar vizzes