Question1
✓ Published1🌍 Public
This example visualizes the population of Indian states as a pie chart, with a legend positioned to the right. The chart uses a categorical color scheme from `d3.scaleOrdinal` and `d3.schemeCategory10` to distinguish states. The pie segments are generated with `d3.pie`, and their arcs are drawn using `d3.arc` with an inner radius of zero, producing a standard pie. Population values are parsed from a CSV file loaded via `d3.csv`, and labels display raw population in millions. The SVG rendering is driven by D3’s selection and data-join methods, with text elements for the title and legend.
AI-generated descriptionMIT Licensed