🌍 Public
Viewing a saved revision (read-only)
3bf89dc777084e45a2ec581be9fb589a
Activity 7_question1
This example shows a donut chart of categorical sales data, with each slice labeled by category and a legend on the left. Hovering over a slice displays a tooltip with the percentage share of the total sales. The code uses D3 v7 with `d3.pie` and `d3.arc` to generate the pie geometry, and `d3.scaleOrdinal` with `schemeCategory10` for colors. Data is loaded as CSV from a GitHub gist, and the SVG is rendered with a centered group and a 200-pixel right margin for the legend.
AI-generated description