Skip to main content
100%

piechart

✓ Published0🌍 Public
Jjaswanthreddy2715@gmail.com
Last edited Nov 5, 2024
Created on Nov 5, 2024
Forked from HTML Starter

This visualization displays a pie chart representing the top 10 store areas by sales, with each slice labeled by its sales value and accompanied by a color-coded legend. The chart sorts the input CSV data in descending order before extracting the top 10 entries, then uses d3.pie() and d3.arc() to generate the slices within an SVG rendered by React. The code employs d3.scaleOrdinal for color assignment and d3.csv to load the Stores dataset from a GitHub gist, with slice labels positioned using arc.centroid().

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes