Skip to main content
100%

Fork of Activity-6 Task-2,Q-3

✓ Published0🌍 Public
Kkrishna444battula@gmail.com
Last edited Oct 20, 2024
Created on Oct 20, 2024
Forked from Activity-6 Task-2

This example displays a stacked bar chart comparing low and high CO2 emissions per kilometer for various transportation modes, with usage counts labeled above each bar. It uses D3 v7 to load data, stack the emission values, and render the SVG. The code demonstrates hover tooltips showing emissions details, axis labeling, and custom styling through CSS. The bars are colored distinctly for low and high emission ranges, and the chart is built using `d3.scaleBand`, `d3.scaleLinear`, and `d3.stack`.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes