Activity6_Question2
✓ Published0🌍 Public
This stacked bar chart compares the proportional energy sources—coal, natural gas, nuclear, renewables, and other—across six countries using D3 v7’s `d3.stack`, `d3.scaleLinear`, and `d3.scaleBand`. Each bar segment is colored via a `d3.scaleOrdinal` color scale, and a hover tooltip reveals the exact percentage for each energy type. The SVG renders with custom axes and labels, reading the data from a CSV file that specifies each country’s energy mix as fractions.
AI-generated descriptionMIT Licensed