Skip to main content
100%

piechart

✓ Published0🌍 Public
Rrajeswariamruthabommaraju@my.unt.edu
Last edited Nov 6, 2024
Created on Nov 6, 2024
Forked from Hi VizHub

This pie chart visualizes categorical data loaded from a CSV file, displaying each category as a colored slice with a label and a legend. The code uses D3 v6 API functions including `d3.pie` to compute arc data, `d3.arc` for path generation, and `d3.scaleOrdinal` with `d3.schemeCategory10` for color mapping. It renders as an SVG with a centered group, positioning arc paths and text labels via the `arc.centroid` method, while the legend is built with appended rectangles and text elements.

AI-generated description
MIT Licensed

Similar vizzes