Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

piechart

Public visualization

Viewing a saved revision (read-only)

c99e0a7d29ac4909a132694e2f4c9ee7

piechart

0 stars0🌍 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.