🌍 Public
Viewing a saved revision (read-only)
4e8365caace445e1941dae200acc1ec5
Question_1(b)
This visualization shows the population of 20 countries in the year 2010 as a horizontal bar chart. The bars are rendered as SVG rectangles using React components, with the x-axis scaled linearly and the y-axis using a band scale for country names. The code uses D3 v5’s `scaleBand`, `scaleLinear`, `max`, and `format` for axes and tick labels, while the dataset is loaded via `d3.csv` from a GitHub URL. A simple tooltip is provided through SVG `<title>` elements showing the formatted population value.
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.