🌍 Public
Viewing a saved revision (read-only)
6ee420603d374bac9f6c844237dc2d53
task 9 Q1
This example displays a pie chart with a legend, using a dataset fetched from a GitHub-hosted CSV. Each sector of the pie represents a percentage value, and the legend lists the sector names alongside their corresponding percentages. The visualization is built with D3 v6, employing the `d3.pie` and `d3.arc` APIs for the chart itself, while the legend is constructed as a separate SVG element. Data is loaded asynchronously via `d3.csv`, and colors are assigned using a Tableau10 color scheme.
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.