🌍 Public
Viewing a saved revision (read-only)
b5812cff0202493c9f38946a6ea6f22a
Activity 6
This example shows a horizontal bar chart of 2020 population data for 30 countries, with bars colored green and blue axis lines and labels. The chart uses React components to render SVG marks and axes, with D3 v5’s `scaleBand` and `scaleLinear` for positioning, `csv` for loading the dataset from a GitHub URL, and `format` for abbreviating population values (e.g., “B” for billions). A tooltip via the SVG `<title>` element displays the formatted population on hover.
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.