Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

activity7.1

Public visualization

Viewing a saved revision (read-only)

c42fb26acd4c4e6eb1c450c165cd8400

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