Skip to main content
100%

activity 6 task 2 Q1

✓ Published0🌍 Public
Ssumanthpenna0221@gmail.com
Last edited Oct 25, 2024
Created on Oct 25, 2024

This stacked bar chart shows the proportional CO2 emissions of four vehicle types—Sedan, SUV, Truck, and Motorcycle—split across four fuel categories: Petrol, Diesel, Electric, and Hybrid. Each horizontal bar is normalized to 100%, with colored segments representing fuel-type proportions. Built with D3 v7, the visualization uses `d3.stack()` to compute stacked series, `d3.scaleBand` for the vehicle-type axis, and `d3.scaleLinear` for the percentage scale. Data comes from a local CSV file, rendered as SVG with a color legend and percentage-formatted x-axis ticks.

AI-generated description
MIT Licensed

Similar vizzes