Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

pqb

Public visualization

Viewing a saved revision (read-only)

9c84214d81ab42d485f0dbc8065315cb

pqb

0 stars0🌍 Public
CCaliphe Buchanan
Last edited Jun 15, 2020
Created on Jun 15, 2020
Forked from Making a Bar Chart

This example shows a horizontal bar chart of population data for ten countries, with each bar’s length proportional to its population and countries labeled along the vertical axis. The visualization uses D3 v5’s `scaleLinear` and `scaleBand` to map population values and country names to SVG rectangles, while `axisLeft` and `axisBottom` generate the corresponding axes. Data is loaded from a CSV file containing country and population columns, with population values converted from thousands to absolute numbers before rendering. The React framework wraps the D3 code, producing an SVG output within a 960×500 viewport.

AI-generated description

A bare minimum HTML page.

See also React Starter.