🌍 Public
Viewing a saved revision (read-only)
47d6b3420b2b49a4b0bc61f6bcb50c8c
Activity 7_question1
A pie chart displays categorical sales proportions, with each slice labeled and colored by category. Hovering over a slice reveals an HTML tooltip showing the percentage of total sales. The visualization is built with D3 version 7, using the `d3.pie()` layout and `d3.arc()` generator to create slice paths. It loads CSV data from a GitHub Gist via `d3.json()`, applies an ordinal color scale, and includes a custom legend. An SVG canvas renders all marks, while tooltip positioning tracks mouse coordinates.
AI-generated description