question1act7
✓ Published0🌍 Public
This example shows the distribution of Olympic medals by country using a pie chart, where each slice represents a country’s total medal count (Gold, Silver, and Bronze). The visualization uses d3.pie and d3.arc to compute and draw the chart, with d3.scaleOrdinal and d3.schemeCategory10 assigning distinct colors to each segment. A legend is appended using SVG rectangles and text, while the data is fetched from a CSV URL via d3.csv. The SVG canvas is 960 by 500 pixels, and the chart is centered within it.
AI-generated descriptionMIT Licensed