Skip to main content
100%

Fork of Pie Chart

✓ Published1🌍 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
MIT Licensed

Similar vizzes