Activity 7.1-1
✓ Published0🌍 Public
This example shows a pie chart of car sales by brand, using a dataset loaded from a GitHub-hosted CSV file. It aggregates the raw data with d3.rollup and d3.sum to compute total units sold per brand, then renders the slices with d3.pie and d3.arc in an SVG. Each brand receives a distinct color from a predefined map, and a legend displays the brand names alongside their corresponding sales totals. The visualization also logs intermediate data to the console for debugging.
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.
MIT Licensed