Skip to main content
Public

Share visualization

Loading preview…

Question 2

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Question 2

0
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

Comments

Sign in to join the discussion.

MIT Licensed