Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

activity7.1

Public visualization

Viewing a saved revision (read-only)

522ec1d6b3e943b6b4e807789197f2cd

activity7.1

0 stars0🌍 Public
GGanesh Gundekarla
Last edited Apr 10, 2025
Created on Apr 10, 2025
Forked from HTML Starter

This example displays a donut chart depicting energy consumption by source in terawatt-hours, with an accompanying legend. The visualization uses D3.js v7 to load a CSV from a GitHub gist, then applies the `d3.pie()` layout and `d3.arc()` generator to render each segment as an SVG path. Each slice is labeled with its energy source, and a legend lists each source, its type, and consumption value in TWh. The chart uses `d3.scaleOrdinal` with the `d3.schemeSet3` color palette for categorical distinction.

AI-generated description