🌍 Public
Viewing a saved revision (read-only)
e5be8a7e9258469f985d65a934ff0dfd
ICE-7 Pie Chart
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