Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

CSCE5320 Assignment 7

Public visualization

Viewing a saved revision (read-only)

dad676203d714e9d9a683c1190f9edb1

CSCE5320 Assignment 7

0 stars0🌍 Public
NNhi Ha
Last edited Oct 25, 2026
Created on Oct 25, 2026
Forked from HTML Starter

This gallery example implements a reusable bar chart that visualizes CO₂ emissions per capita for countries in 2023, with interactive controls for sorting the bars alphabetically, by value, or by a derived attribute. The D3 v7 script uses chainable getter/setter functions in the closure style to redraw the SVG chart under different orderings, leveraging `d3.scaleBand`, `d3.scaleLinear`, `d3.axisBottom`, and `d3.axisLeft`. Data is loaded from an external CSV file, and the chart is rendered entirely as SVG elements with buttons controlling the sort order.

AI-generated description