Skip to main content
100%

pie chart

✓ Published1🌍 Public
CChindamrohan321@gmail.com
Last edited Oct 27, 2025
Created on Oct 27, 2025

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 description
MIT Licensed

Similar vizzes