Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Pie Chart

Public visualization

Viewing a saved revision (read-only)

ae35405cf3a74e1f9cf300b49bb2ba63

Fork of Pie Chart

0 stars0🌍 Public
Eeravellisaimeghana
Last edited Mar 29, 2022
Created on Mar 29, 2022
Forked from Pie Chart

A fork of a pie chart visualization displays 2022 US auto sales by brand, sourced from a CSV file hosted on a gist. The chart uses d3.pie and d3.arc to generate SVG segments, with d3.scaleOrdinal assigning a custom color palette. Each brand’s slice is accompanied by a legend showing the brand name, its percentage of total sales (computed from the summed YTD values), and the sales figure in thousands. The code loads data asynchronously using d3.csv, then renders the chart and legends via SVG groups, with text formatted using d3.format.

AI-generated description