🌍 Public
Viewing a saved revision (read-only)
1de9218699b84df793326e2fbe4178dd
Activity_7
This pie chart visualizes fruit category proportions loaded from a GitHub Gist CSV file, with each slice labeled and colored using d3.scaleOrdinal with d3.schemeSet3. The D3 v7 code loads the data via d3.csv, converts values to numbers, and generates arcs with d3.pie and d3.arc. A custom legend, built as HTML divs, displays each category’s color and percentage. The SVG rendering includes white category labels positioned at slice centroids.
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.