Fork of veda_piechart7
✓ Published0🌍 Public
This example shows a pie chart of GDP per capita from the 2019 Happiness Report, with each slice labeled by country or region and accompanied by a colored legend. Built with D3.js v6 and React, the chart uses `d3.pie()` to compute arc segments and `d3.arc()` for path generation, assigning colors via `d3.scaleOrdinal` with the `schemeCategory10` palette. Country labels are placed using arc centroids, and the legend maps colors to country names, all rendered as SVG elements within a 960x500 canvas.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed