Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Pie chart - Activity 7

Public visualization

Viewing a saved revision (read-only)

0bfde2dcc5094200bfe3fb4fecdbea0c

Pie chart - Activity 7

0 stars1🌍 Public
Ssahithigovindaraju@my.unt.edu
Last edited Nov 6, 2024
Created on Nov 6, 2024
Forked from Hello VizHub

This pie chart displays the distribution of irrigation types from an agricultural dataset, with each slice labeled and color-coded by category. The visualization is built using D3.js v6, loading data from a remote CSV file. The code uses `d3.pie()` to compute arc segments, `d3.arc()` for rendering the slices, and `d3.rollup()` to aggregate the dataset by irrigation type. Each slice includes its type name and count, alongside a manually positioned legend with custom colors.

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.