Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity6_Question1.2

Public visualization

Viewing a saved revision (read-only)

75e20c7aa67e49edbb31e4dec7cef2a3

Activity6_Question1.2

0 stars0🌍 Public
Llikhitha.sarahah01@gmail.com
Last edited Oct 19, 2024
Created on Oct 19, 2024
Forked from Hello VizHub

This example displays a horizontal bar chart of population data for 20 countries in 2010, with each bar’s length proportional to the country’s population. The visualization uses React components to render SVG elements, with D3 v5’s `scaleBand` and `scaleLinear` handling the y- and x-axis mappings, respectively. Data is loaded via D3’s `csv` method from a GitHub-hosted dataset, and the bars include a native SVG `<title>` element for tooltips. The axes are customized with pink tick lines and a formatted tick label that converts values into billions (e.g., using `format('.2s')`).

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.