Skip to main content
100%

pie chart

✓ Published0🌍 Public
Rreddyharshi08@gmail.com
Last edited Nov 8, 2024
Created on Nov 8, 2024
Forked from Hello VizHub

This pie chart visualizes country populations using D3.js v6, rendering each slice as an SVG path with a categorical color scale. The code loads CSV data from a GitHub gist, processes population values, and uses d3.pie() and d3.arc() to generate the chart geometry. Each slice is labeled with its country name positioned at the arc centroid, while a custom legend built from SVG rectangles and text elements displays the color assignments alongside the chart.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes