Pie Chart with Legend
✓ Published1🌍 Public
This pie chart visualizes the population of fantasy worlds in millions, using a categorical color scale to distinguish each world. The chart renders an SVG with D3’s `pie` and `arc` generators, while `scaleOrdinal` and `schemeCategory10` assign colors. A legend on the right lists each world and its population, built with appended SVG rectangles and text labels. Data is loaded as CSV from a GitHub gist, formatted via a custom number formatter, and styled with red and blue headings in the HTML.
AI-generated descriptionReact Starter code.
MIT Licensed