Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity6_Task1_Qus2

Public visualization

Viewing a saved revision (read-only)

9ddd7d134d174c9fa3d3a8cd2dca1c80

Activity6_Task1_Qus2

0 stars1🌍 Public
Aamarnadhkari98@gmail.com
Last edited Oct 25, 2024
Created on Oct 25, 2024
Forked from Hello VizHub

This horizontal bar chart displays the population of the top 20 countries for the year 2010, using D3.js v5 within a React framework and rendering via SVG. The visualization is built with `scaleBand` for the categorical y-axis and `scaleLinear` for the numeric x-axis, with bars drawn as SVG rectangles. Population values are loaded from a CSV file using D3's `csv` function, formatted with `d3.format` to abbreviate large numbers (e.g., 'B' for billions), and include interactive tooltips showing the formatted population on hover. The chart includes styled blue tick marks and green bars, with axes labeled accordingly.

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.