Skip to main content
100%

activity 7 task 1

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

This pie chart visualizes the distribution of horsepower values across different car makes from a CSV dataset. The code uses D3 v7’s `pie()` and `arc()` generators to compute and draw the slices as SVG paths, with a `scaleOrdinal` color scale mapping each make to a distinct fill. A legend is appended as SVG rectangles and text labels, while axis titles for “Car Make” and “Horsepower” are added manually. The visualization reads data asynchronously via `csv()`, converts horsepower to numeric values, and renders with a light gray background.

AI-generated description
MIT Licensed

Similar vizzes