Skip to main content
100%

Activity 7

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

This example shows a pie chart representing car sales by brand, aggregated from a CSV dataset. It uses D3 v7’s `d3.pie` layout and `d3.arc` to generate SVG paths for each slice, while `d3.rollup` sums the `Units_Sold` values per `Car_Brand`. A custom color mapping assigns distinct hues to Toyota, Honda, Ford, and Chevrolet, with an HTML legend displaying each brand’s name and total units. The SVG is centered within a 500×500 pixel viewport.

AI-generated description

This is a piechart of irrigation type distribution

MIT Licensed

Similar vizzes