🌍 Public
Viewing a saved revision (read-only)
6546da6b143748fe8c2a7eae94777c83
Pie Chart with Legend
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.