Skip to main content
100%

act 7 q1

✓ Published0🌍 Public
Vvinaykollapudi@my.unt.edu
Last edited Nov 6, 2024
Created on Nov 6, 2024
Forked from Hello VizHub

This example displays a pie chart of the top 10 countries by 2022 population, with a legend alongside the slices. It uses D3.js v7 APIs including `d3.csv`, `d3.pie`, `d3.arc`, and `d3.scaleOrdinal` to load and process the dataset, generate the pie geometry, and assign categorical colors. The chart is rendered as SVG with text labels positioned via arc centroids, while a legend is built manually with `rect` and `text` elements. Data comes from a CSV hosted on GitHub.

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