Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

activity7_question1

Public visualization

Viewing a saved revision (read-only)

428e0e7f43b34757b5e2ceccb4c87f03

activity7_question1

0 stars0🌍 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.