Pie Chart
✓ Published0🌍 Public
This example shows an interactive pie chart that displays fruit quantities by region, with radio buttons to switch between fruit types. The chart renders as an SVG using React and D3 v5, employing `d3.pie` and `d3.arc` to generate the donut-shaped paths with an inner radius of 200 and outer radius of 300. Color encoding is handled by `d3.scaleOrdinal` with the Tableau10 scheme, while `d3.nest` groups the tab-separated fruit data, which originates from the World Bank population dataset.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.
This data was taken from The world bank data website
MIT Licensed