Fork of Activity-6 Task-2Q-3
✓ Published0🌍 Public
This example shows a stacked bar chart comparing low and high CO2 emissions per kilometer across six transportation modes, with usage counts labeled above each bar. The chart uses D3 v7’s `d3.stack()` and `d3.scaleBand()` to build the stacked rectangles, and displays a tooltip on hover showing the mode and emission range. SVG rendering with axes and styled labels is handled through D3 selections, while the dataset is hardcoded as JavaScript objects rather than loaded from the provided CSV.
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