Skip to main content
100%

activity7_question1

✓ Published0🌍 Public
Nnishwitha.1032@gmail.com
Last edited Nov 1, 2024
Created on Nov 1, 2024

This example visualizes the distribution of car horsepower across ten manufacturers using a pie chart, with each slice representing a manufacturer and its size corresponding to the car's horsepower value. The visualization is built with React and D3 version 5, using the `pie` API to compute slice angles, `arc` to generate the donut-shaped paths, and `d3.selectAll` for SVG element creation. Data is loaded from a remote CSV via `d3.csv`, and percentage labels and a legend are rendered using D3's `format` and `schemeCategory10` color palette. All marks and text are rendered as SVG elements within a React component.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes