Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Hello VizHub Task 2

Public visualization

Viewing a saved revision (read-only)

0dfd5bc214c74944a929d6f29d9e3000

Fork of Hello VizHub Task 2

0 stars0🌍 Public
VVijay Sheru
Last edited Apr 11, 2024
Created on Apr 10, 2024
Forked from Hello VizHub

This stacked bar chart shows the distribution of population across years for the top 10 countries, with each bar segment representing a year's contribution. The visualization uses D3.js v7, employing `d3.stack` with `d3.keys` to create the stacked structure, `d3.scaleLinear` and `d3.scaleBand` for axes, and `d3.axisBottom` and `d3.axisLeft` for ticks. Data is loaded from a CSV file, with `d3.csv` fetching the dataset. The chart renders as SVG, populating rectangles for each segment, and includes a legend and axis labels.

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.