🌍 Public
Viewing a saved revision (read-only)
efad8e059a6f45e08d725a57994edc47
Fork of ICE - 7 Pie chart
This pie chart visualizes survey respondents’ top choices for social media usage, with each slice labeled by its percentage and a matching color-coded legend. The chart is built with D3 v5, using `d3.pie` and `d3.arc` to generate the paths and `d3.scaleOrdinal` to assign categorical colors. Data is loaded asynchronously from a CSV via `d3.csv` and rendered as SVG. The code also employs `arc.centroid` to position the percentage labels directly on each slice, while the legend pairs colored rectangles with social media names and values.
AI-generated description