Skip to main content
100%

Pie Chart

✓ Published0🌍 Public
SSwapna1915
Last edited Jul 5, 2023
Created on Jul 5, 2023
Forked from Hello VizHub

This pie chart visualizes the distribution of students across university majors, highlighting each segment’s count both inside the slice and in an accompanying legend. The visualization is built with D3 v5, using `d3.arc()` to generate the pie segments and `d3.scaleOrdinal` for categorical colors. Data is loaded asynchronously from a CSV via `d3.csv()`, and SVG elements are created and positioned with `select` and `attr`. The chart uses a red title and custom styling for ticks and text, presenting a clear, colorful overview of enrollment data.

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