🌍 Public
Viewing a saved revision (read-only)
51f59eef35cb47dbaa7f665680708f9c
Fork of activity 6_Question 1A
This example shows a horizontal bar chart ranking population figures for ten countries in the year 2000, using a CSV dataset fetched from GitHub. The visualization uses D3 v5 scales (`scaleBand`, `scaleLinear`) to map country names and population values to screen coordinates, while React components (`AxisBottom`, `AxisLeft`, `Marks`) render the SVG axes and bars. Population values are formatted with `format('.2s')` to display compact tick labels like “1.2B,” and native SVG `<title>` elements provide hover tooltips with the same formatted values.
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.