Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Pie Chart

Public visualization

Viewing a saved revision (read-only)

8ebcb5985a4346439eec46274a01022c

Fork of Pie Chart

0 stars1🌍 Public
JJyothicherukuri
Last edited Mar 27, 2022
Created on Mar 27, 2022
Forked from Pie Chart

This example visualizes 2022 US auto sales by brand as a pie chart, with a legend displaying brand names and sales values in thousands. The chart uses D3 v5 APIs including `d3.pie` to compute arc segments, `d3.arc` to generate SVG paths, and `d3.scaleOrdinal` for categorical color mapping. Data is loaded asynchronously from a CSV file hosted on a GitHub gist using `d3.csv`. The visualization renders to an SVG canvas with a fixed 960×500 viewport, and the legend labels are positioned manually via SVG transforms.

AI-generated description