Skip to main content
100%

Activity6_Question2

✓ Published0🌍 Public
KKhushi Desai
Last edited Oct 20, 2024
Created on Oct 19, 2024
Forked from Hello VizHub

A stacked bar chart displays energy consumption proportions across four sectors—Residential, Commercial, Industrial, and Transportation—from 2016 to 2020, using data from data.csv. The visualization uses d3.scaleBand, d3.scaleLinear, and d3.scaleOrdinal with d3.stack to layer bars, while d3.axisBottom and d3.axisLeft render axes with percentage formatting. An SVG legend maps colors to sectors, and the chart is styled via external CSS.

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