Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Pie Chart for Electronic sales

Public visualization

Viewing a saved revision (read-only)

44426002245242d79119d15f3e33adce

Fork of Pie Chart for Electronic sales

0 stars1🌍 Public
Ssreeramyamini@gmail.com
Last edited Mar 28, 2024
Created on Mar 27, 2024
Forked from Pie Chart

This D3.js (v7) visualization displays a pie chart of electronic product sales, with each slice representing a product category’s total revenue. The chart uses a custom legend showing category names, percentage of total sales, and sales values in thousands. The code fetches CSV data via `d3.csv`, computes pie segments with `d3.pie`, and renders them as SVG paths using `d3.arc`. Colors are assigned via `d3.scaleOrdinal`, and the legend and percentages are formatted using `d3.format`.

AI-generated description