Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Task-8 Q2

Public visualization

Viewing a saved revision (read-only)

8e34a01960544c80a0cb704d7eb09be1

Task-8 Q2

0 stars0🌍 Public
AAnilKumarReddyVanteru@my.unt.edu
Last edited Apr 14, 2024
Created on Apr 14, 2024
Forked from Hello VizHub

This bar chart displays the populations of 20 countries in 2010. Built with React and D3.js v5, it renders scalable vector graphics (SVG) rectangles whose widths are proportional to each population value. The chart imports `scaleBand`, `scaleLinear`, `max`, and `format` from D3 to position the bars and format tick labels with a custom billion suffix. Data is loaded asynchronously from a remote CSV file using D3's `csv` function, and each country's population is calculated by multiplying the 2010 column by 1,000. The visualization includes labeled axes for both country and population.

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.