Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

ICE-7 Pie Chart

Public visualization

Viewing a saved revision (read-only)

e5be8a7e9258469f985d65a934ff0dfd

ICE-7 Pie Chart

0 stars0🌍 Public
GGaneshPenumarthi
Last edited Mar 27, 2022
Created on Mar 27, 2022

This gallery example shows a pie chart displaying the number of new coronavirus cases admitted in the United Kingdom during the last week of January 2021, with each slice labeled with its value and a legend indicating the corresponding date. The visualization uses D3 v5’s `pie`, `arc`, and `scaleOrdinal` APIs to compute and render the SVG paths, while fetching data from a remote CSV via the `csv` function. Each slice is filled using a categorical color scale, and text labels are placed using the arc’s `centroid` method. The legend is built manually with appended rectangles and text elements.

AI-generated description