Skip to main content
100%

Question 2

✓ Published0🌍 Public
Nnitishsurneni@gmail.com
Last edited Apr 6, 2025
Created on Apr 6, 2025

This visualization shows the proportional distribution of CO2 emissions by fuel type across different vehicle categories. Using a horizontal stacked bar chart, each vehicle type displays segments for Petrol, Diesel, Electric, and Hybrid fuel sources, colored with a categorical scale. The D3.js code loads data from a CSV file, stacks the fuel-type columns using the `d3.stack` API, and renders the result as SVG rectangles scaled by the linear x-axis. A legend identifies each fuel type, while the y-axis labels the vehicle types. The chart enables quick comparison of fuel-source shares within each vehicle category.

AI-generated description
MIT Licensed

Similar vizzes