Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Pie Chart

Public visualization

Viewing a saved revision (read-only)

ccc229cb6d2643f3a8ec301eaba16bc0

Pie Chart

0 stars0🌍 Public
MMonish Galla
Last edited Apr 10, 2024
Created on Apr 10, 2024
Forked from Hello VizHub

This pie chart visualizes the distribution of a single category from a CSV dataset, showing the proportion of values across multiple person types. Built with D3.js v7, it uses `d3.csv` to fetch the data, `d3.pie` and `d3.arc` to compute and draw the slices, and `d3.scaleOrdinal` for the color scheme. A legend, generated alongside the chart, maps each slice to its corresponding type using the same categorical colors. The visualization is rendered as an SVG with a fixed 400x400 pixel canvas.

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.