Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Q1_DataViz_PiechartForCarPerformance

Public visualization

Fork of Q1_DataViz_PiechartForCarPerformance

0 stars0🌍 Public
Nnikhilkinnera1998@gmail.com
Last edited Mar 26, 2025
Created on Mar 26, 2025

This example shows the distribution of horsepower across various car models using a pie chart with a color-coded legend. It loads CSV data from a GitHub gist via `d3.csv`, then builds the chart with `d3.pie`, `d3.arc`, and `d3.scaleOrdinal` using `d3.schemeCategory10`. The SVG renders labeled arcs with model and horsepower values, while a separate legend group lists each model. The code uses D3 v6 and renders entirely as SVG within a dedicated container.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed