🌍 Public
CSCE5320 Assignment 7
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 descriptionMIT Licensed
Comments
Sign in to join the discussion.