Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Task9_Question2

Public visualization

Viewing a saved revision (read-only)

87bd0c18f6da4ea39d0ea9b79abdfd4b

Task9_Question2

0 stars0🌍 Public
KKeerthi
Last edited Apr 21, 2024
Created on Apr 21, 2024
Forked from Hello VizHub

This area chart visualizes carbon emissions production across multiple countries over time, using stacked colored regions to compare annual values. The code loads data from a CSV file via `d3.csv` and renders SVG paths using the `d3.area` generator, with `d3.scaleBand` for the x-axis and `d3.scaleLinear` for the y-axis. It includes custom axis labels, rotated tick text, and an interactive legend built with SVG rectangles. Colors are assigned sequentially using HSL values, and axes are generated with `d3.axisBottom` and `d3.axisLeft`.

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.