🌍 Public
Viewing a saved revision (read-only)
8cae0360d4da4e35a995430d10c1b528
Fork of Pie Chart (with labels) with d3
This example visualizes the top 10 US states by GDP as a static pie chart, with each slice labeled and interactivity via hover tooltips that display the state name and value. The chart is built using React with D3 v4, rendering SVG paths via the `d3.arc` and `d3.pie` APIs. Data is loaded from a CSV file using `d3.csv`, and colors are assigned via `d3.scaleOrdinal` with `d3.schemeCategory10`. The tooltip is a dynamically appended SVG group that follows mouse movement using `d3.mouse`.
AI-generated description