ICE-7 Pie chart
✓ Published0🌍 Public
This example shows a pie chart of student marks, mapping country names to color-coded slices based on their associated death counts. The visualization uses React state to asynchronously load CSV data via `d3.csv`, then generates the pie layout with `d3.pie()` and renders each slice as an SVG path using `d3.arc()`. A `scaleOrdinal` assigns colors, and a separate legend lists the countries with matching color swatches. Charts are centered with a fixed 600x400 viewport, styled with white strokes between segments.
AI-generated descriptionMIT Licensed