Pie Chart
✓ Published0🌍 Public
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 descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed