Skip to main content
100%

Task 9

✓ Published0🌍 Public
Ppranayrajana.97@gmail.com
Last edited Apr 28, 2024
Created on Apr 24, 2024
Forked from Hello VizHub

This pie chart visualizes the top 10 Democrat state populations, with each slice sized proportionally to the state's Democratic population count and colored using D3’s `scaleOrdinal` and `schemeCategory10`. The code loads data from a CSV file via `csv()`, sorts it, and renders the chart with `pie()`, `arc()`, and SVG `path` elements. A legend, built with custom `rect` and `text` elements, displays state names and population values formatted in millions.

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