Skip to main content
100%

Activity 7.1-1

✓ Published0🌍 Public
DDeekshitha Annreddy
Last edited Nov 6, 2024
Created on Nov 6, 2024

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 description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes