Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

ICE 7

Public visualization

Viewing a saved revision (read-only)

10be54399c254454b75358e3a26b1067

ICE 7

0 stars1🌍 Public
AArv1228
Last edited Mar 27, 2022
Created on Mar 27, 2022

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 description