🌍 Public
Viewing a saved revision (read-only)
f32ece83c13a4e408288b535f30564fc
Activity7_Que1
This pie chart visualizes the fares of the first ten passengers from a Titanic dataset, labeling each slice with its dollar amount and listing passenger names in a color-coded legend. Built with D3 v6, it loads CSV data via `d3.csv`, converts fares to numbers, and uses `d3.pie` and `d3.arc` to generate SVG paths. A sequential `d3.scaleOrdinal` with `d3.schemeCategory10` assigns colors, while labels and legends are positioned using arc centroids and SVG text elements.
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.