🌍 Public
Viewing a saved revision (read-only)
5e892388fe8e400b9f654c7a135b95e9
ICE-7 Pie Chart
This example visualizes the weekly sales of Walmart for ten dates as a pie chart, with each slice colored and labeled by its corresponding sales amount in millions of dollars. The pie chart layout is generated using D3.js version 7, employing the `pie` and `arc` functions, while `scaleOrdinal` with `schemeCategory10` assigns colors. A legend on the right displays each date and its formatted sales value, drawn with SVG `rect` and `text` elements. The data is loaded asynchronously from a CSV file hosted on GitHub, and all rendering is done with SVG.
AI-generated descriptionA demonstration of how to start using D3 version 6.