🌍 Public
Viewing a saved revision (read-only)
4bc975dbe9cd4d22bd896f06b0c8263f
sample
A pie chart displays the sales distribution of four electronic items—Smartphone, Tablet, Laptop, and Smartwatch—using D3.js v7 with SVG rendering. The chart encodes sales values as arc sizes, with each slice labeled by item name and sales amount, and a positioned legend showing color-coded item categories. Built with `d3.pie` and `d3.arc`, the visualization uses `d3.scaleOrdinal` with `schemeCategory10` for colors and appends path and text elements to the SVG. The legend is constructed as HTML divs, and all data comes from a static in-memory dataset.
AI-generated description