Divya Activity 7 Question 1
This pie chart visualizes total sales by product, showing proportional slices for each product in a sales dataset. The visualization uses D3.js v5 with SVG rendering, employing `d3.rollup` to aggregate sales totals per product and `d3.pie` to compute arc angles. The `d3.arc` generator draws the pie segments, while a color-coded legend identifies each product. Data is loaded asynchronously from a CSV file hosted on GitHub using `d3.csv`, with slices labeled directly on the chart via `arc.centroid`. The resulting graphic provides an at-a-glance comparison of sales performance across product categories.
AI-generated descriptionPie Chart of Total Sales by Product
This D3.js visualization shows a Pie Chart for different products based on their total sales.
Dataset link:
Sales Data CSV (GitHub)
Created By: Divy260