Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Pie Chart of Titanic

Public visualization

Viewing a saved revision (read-only)

0a966b86c3c743c9b7e299aafb476716

Pie Chart of Titanic

0 stars0🌍 Public
AAreeba Hassan
Last edited Nov 6, 2024
Created on Nov 5, 2024
Forked from Hello VizHub

This pie chart visualizes survival outcomes for Titanic passengers, splitting the dataset into green "Survived" and red "Not Survived" slices with value labels and a legend. It loads CSV data from a GitHub repository using `d3.csv`, aggregates counts via `d3.rollup`, and generates the chart with `d3.pie` and `d3.arc`. Hover interactions trigger a scale transition on slices, while SVG text elements provide axis labels and legend annotations. The visualization renders entirely in SVG with D3 v7.

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.