🌍 Public
Viewing a saved revision (read-only)
f30c95ba4f2d409b80347bb959a2bef6
William_Task9_10
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 descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.