Skip to main content
100%

sample

✓ Published1🌍 Public
Gganesh.hns48@gmail.com
Last edited Apr 8, 2024
Created on Apr 8, 2024
Forked from Hello VizHub

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

Similar vizzes