🌍 Public
Viewing a saved revision (read-only)
4c68f70be9d44282aa9622daa4e1d149
Task 1 Question 2
This example displays a horizontal bar chart of population data from the year 2000 for ten countries, using green bars with blue tick lines and grey labels. React components render the SVG marks and axes, while D3 v5 functions like `scaleBand`, `scaleLinear`, and `max` handle data scaling and domain calculations. The population values are loaded from a remote CSV file and formatted using D3’s `format` to abbreviate large numbers, with tooltips showing the formatted values 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.