Fork of Pie Chart
✓ Published0🌍 Public
This example visualizes state sales data as a pie chart, with each slice colored by total sales value and a corresponding legend listing state names alongside their formatted dollar amounts. The top ten states by sales are shown, sorted in descending order. Built with React and D3 v5, it uses d3.pie, d3.arc, and d3.scaleOrdinal to generate SVG paths, while d3.csv loads the external dataset from a GitHub gist. Mouseover events log slice data to the console, and all rendering occurs within an SVG container.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed