Skip to main content
100%

pie chart

• Draft0🔗 Unlisted
Ttadisatishreddy2000@gmail.com
Last edited Mar 31, 2025
Created on Mar 31, 2025
Forked from Bar_Plot

This interactive pie chart displays hospital-wise patient distribution for a selected year, with a dropdown menu to switch between years and a color-coded legend identifying each hospital. The visualization loads CSV data via `d3.csv` and uses `d3.pie()` to compute arc angles, `d3.arc()` to generate SVG paths, and `d3.scaleOrdinal(d3.schemeCategory10)` for slice colors. The chart redraws completely on year selection by clearing and re-appending SVG groups and legend items, rendering the final output as static SVG in the browser.

AI-generated description
MIT Licensed

Similar vizzes