Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 6 Task 1

Public visualization

Viewing a saved revision (read-only)

65a06c9591dd437eb08c97a835ca7ec6

Activity 6 Task 1

0 stars0🌍 Public
Jjaswanthreddy2000@gmail.com
Last edited Apr 4, 2024
Created on Apr 4, 2024
Forked from Hello VizHub

This visualization displays the population of 30 countries in 2020 using a horizontal bar chart rendered as SVG in React. It imports D3 v5 utilities such as `scaleBand`, `scaleLinear`, `max`, and `format` to map country names to bar heights and population values to bar widths. The chart includes labeled axes, with the y-axis listing countries and the x-axis showing formatted population values (e.g., "1.2B") via a custom tick format. Data is loaded asynchronously from a remote CSV using the `csv` function, and tooltips appear on each bar via a native `<title>` element.

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.