Fork of Activity-6 Task-2,Q-3
✓ Published0🌍 Public
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 descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed