Skip to main content
100%

piechart

✓ Published0🌍 Public
Bbhavyamoturi2509@gmail.com
Last edited Apr 10, 2024
Created on Apr 10, 2024
Forked from Hello VizHub

A pie chart displays the expiry counts by country due to air pollution, with each slice labeled by its value in thousands. The chart uses D3 v5 to load CSV data from a GitHub repository, calculate pie arc paths with `d3.pie` and `d3.arc`, and color slices via `scaleOrdinal`. A legend lists each country with its corresponding value, and text labels are positioned using `arc.centroid`. The SVG renders at 960×500 pixels with explicit colors assigned to each section.

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