Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

William_Task9_10

Public visualization

Viewing a saved revision (read-only)

5179ce2071514dab93134a4680b71bf5

William_Task9_10

0 stars1🌍 Public
WWilliam Nsambu
Last edited Apr 20, 2024
Created on Apr 20, 2024

This pie chart visualizes the proportion of units sold for each product ID from an inventory CSV file. The visualization uses D3.js v7 to load the data, transform it into name-value pairs, and render a categorical pie chart. The code applies the d3.pie and d3.arc APIs to generate the pie segments and a d3.scaleOrdinal color scheme with the category10 palette. Each slice is labeled with the product ID and rendered as an SVG within a 500 by 500 pixel canvas.

AI-generated description