🌍 Public
Viewing a saved revision (read-only)
af5eee92239646a2999c7b3c5763a608
Pie_Chart_Question1
This visualization displays annual sales distribution for an Indian restaurant as a pie chart, with each slice representing a year’s total sales and labeled with the corresponding sales amount. A legend on the right maps each year to its color. The chart is built using D3 v6, fetching CSV data via `d3.csv`, aggregating sales with `d3.rollups` and `d3.sum`, and generating arcs with `d3.arc` and `d3.pie`. Colors are assigned using a `scaleOrdinal`, and all elements are rendered as SVG.
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.