Skip to main content
100%

myViz

✓ Published0🌍 Public
Vveeramallivaishnavi3@gmail.com
Last edited Mar 27, 2025
Created on Mar 27, 2025
Forked from Hello VizHub

This pie chart displays the distribution of accidents by type, with each slice labeled directly on the visualization. The code loads CSV data from a GitHub gist, uses `d3.rollup` to count accidents per category, and `d3.pie()` to generate the arc layout. Slices are rendered as SVG paths via `d3.arc()`, colored with `d3.scaleOrdinal` and `d3.schemeCategory10`, while labels are positioned using `arc.centroid()`. The chart is built with D3 v6 and rendered entirely in SVG.

AI-generated description
MIT Licensed

Similar vizzes