Skip to main content
100%

Fork of ICE - 7 Pie chart

✓ Published2🌍 Public
RRahulSai05
Last edited Mar 29, 2022
Created on Mar 29, 2022

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
MIT Licensed

Similar vizzes