Skip to main content
100%

Activity 7.1 Question 1

✓ Published0🌍 Public
Ppenujulilikhil01020@gmail.com
Last edited Nov 7, 2024
Created on Nov 7, 2024
Forked from Hello VizHub

This example shows the distribution of car horsepower values as an interactive pie chart. It groups the data into ten horsepower bins using `d3.histogram`, then visualizes each bin’s count with `d3.pie` and `d3.arc` in an SVG. A categorical color scale (`d3.scaleOrdinal` with `d3.schemeCategory10`) colors each slice, and a separate HTML legend displays the bin ranges. The data is loaded asynchronously via `d3.csv` from a GitHub Gist, demonstrating local ES6 module imports and D3’s histogram, pie, and arc APIs.

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