pie chart
• Draft0🔗 Unlisted
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 descriptionMIT Licensed