Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Question1

Public visualization

Question1

0 stars1๐ŸŒ Public
Tthakurnikhitha4@gmail.com
Last edited Apr 20, 2024
Created on Apr 20, 2024

This pie chart visualizes the sales quantities of electronics item categories for 2022, with each slice labeled directly and a legend detailing category names and quantities. The visualization is built using D3.js v7 with SVG rendering, employing the `d3.pie()` generator and `d3.arc()` to create the chart, while `d3.scaleOrdinal` with `schemeCategory10` assigns colors. Data is fetched from a remote CSV file hosted on GitHub Gists and parsed manually. Arcs and labels are positioned using centroid calculations, with a flexbox layout placing the legend to the right.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed