Stacked Bar - 29/06
✓ Published0🌍 Public
This example visualizes the greenhouse gas emissions of major US companies, breaking down each company's total emissions into scope 1, 2, and 3 categories as stacked bars. The chart, built with D3 v5 and rendered as SVG in a React context, uses `d3.csv` to load the mock data and `d3.scaleBand` and `d3.scaleLinear` to map company names and emission values to positions. A dashed line marks the average total emissions across all companies, while hovering over any bar segment reveals its specific value via an appended `title` element.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.
MIT Licensed