Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Task 9

Public visualization

Task 9

0 stars0🌍 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.

Comments

Sign in to join the discussion.

MIT Licensed