Pie Chart: Distribution of Items Sold by Country
✓ Published0🌍 Public
JJames Cruz
Last edited Apr 23, 2024
Created on Apr 23, 2024
This visualization displays the distribution of items sold across five countries, with each country's total quantity represented as a proportional slice of a pie chart. The chart uses d3.pie() and d3.arc() to generate the pie geometry, while d3.rollup() aggregates individual data records by country, summing their quantities. The SVG rendering includes interactive hover effects that scale slices slightly, and each slice is labeled with its country name and total quantity. The color scale uses d3.scaleOrdinal with the d3.schemeCategory10 palette.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed