Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

activity 6 task 2 Q1

Public visualization

Viewing a saved revision (read-only)

79312e7bb78844faa5edd98fbf1f0b55

activity 6 task 2 Q1

0 stars0🌍 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