Skip to main content
100%

Fork of Fork of HTML Starter

✓ Published7🌍 Public
Rrobertotienonyaranga@gmail.com
Last edited Mar 27, 2024
Created on Mar 27, 2024

This pie chart displays the year-to-date (YTD) sales distribution across automobile brands in the USA for 2022, with each slice representing a brand’s proportional share. The chart uses D3.js v5’s `pie` and `arc` generators to create SVG paths, with `scaleOrdinal` assigning a fixed color palette to the slices. A legend on the right lists each brand’s name, percentage of total sales, and raw sales figures (in thousands), formatted via `format('.4~g')`. The data is loaded asynchronously from a CSV file hosted on GitHub using `d3.csv`, and the total sales sum is computed to calculate percentages. The visualization focuses on clear comparison through color-coded segments and an annotated legend.

AI-generated description
MIT Licensed

Similar vizzes