Skip to main content
100%

activity7.1

✓ Published0🌍 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
MIT Licensed

Similar vizzes