Skip to main content
100%

My First Chart

✓ Published0🌍 Public
Ggckirchoff
Last edited Dec 18, 2022
Created on Dec 18, 2022

This example displays a horizontal bar chart of 2019 greenhouse gas emissions for the 11 largest GDP countries, with populations represented in MtCO₂e. Rectangles are drawn in SVG using D3 v7’s `scaleBand` and `scaleLinear`, with axes generated by `axisLeft` and `axisBottom`. A custom tooltip appears on mouseover, showing each country’s emission value. The code includes a static placeholder dataset, while the actual CSV loading and rendering logic remains commented out, alongside an unused rectangle animation group.

AI-generated description
MIT Licensed

Similar vizzes