Skip to main content
100%

Fork of veda_piechart7

✓ Published0🌍 Public
Vvedasrivarma13@gmail.com
Last edited Mar 28, 2024
Created on Mar 28, 2024
Forked from veda_piechart7

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 description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes