pie chart
✓ Published1🌍 Public
A pie chart visualizes the proportion of sales across three product categories—Electronics, Clothing, and Food—using hardcoded data from an array. The chart is rendered as SVG with D3.js v7, employing `d3.pie()` to compute arc angles and `d3.arc()` to generate the path shapes, which are filled using a categorical color scale. Each slice includes a centered text label displaying the category and sales value, while a separate legend lists the categories with their corresponding colors.
AI-generated descriptionMIT Licensed