🌍 Public
Viewing a saved revision (read-only)
e5085ccde9924856a49ba928004ffc64
Activity 7
This example displays the 2020 populations of 20 countries as a horizontal bar chart, ordered by country name. The visualization uses React with D3's `scaleBand` and `scaleLinear` to position bars and axes, rendering to SVG. Population values are formatted with D3's `format('.2s')`, converting G to B for billions. Data is loaded asynchronously from a CSV file via `d3.csv`.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.