Skip to main content
100%

Assignmnet 7 Pie Chart

✓ Published0🌍 Public
AAshrith Kudidhi
Last edited Jul 2, 2022
Created on Jul 2, 2022
Forked from Hello VizHub

This pie chart visualizes the proportion of COVID-19 cases across the top five nations, with each slice labeled with its percentage and a color-coded legend listing country names and values. It loads CSV data from a GitHub gist and renders the chart using D3 v5’s pie and arc generators, with a scaleOrdinal for slice colors. Text labels are positioned via arc.centroid, and the legend is assembled manually with rect and text elements. The SVG is selected and sized from the HTML attributes, and data processing occurs asynchronously with async/await.

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