ICE 7
✓ Published1🌍 Public
This example shows the top 10 countries by electronic sales as a pie chart with a legend. Each slice is labeled with its sales value in thousands, and the legend lists country names alongside corresponding values. The code uses d3.csv to load data from a gist, d3.pie and d3.arc to generate the segments, and d3.scaleOrdinal to map sales amounts to colors. Text labels are positioned via arcGenerator.centroid, and the legend is built with appended rectangles and text elements.
AI-generated descriptionMIT Licensed