🌍 Public
Viewing a saved revision (read-only)
fd79b350d1f5406292d54835ff81c886
Activity 6 Question 1.1
This example shows a horizontal bar chart comparing the population of ten countries in the year 2000. The visualization uses D3 v5's `scaleBand` and `scaleLinear` to map categorical country names and numeric population values to SVG coordinates, while React renders the chart elements. The chart includes red tick lines on the x-axis, a labeled x-axis for "POPULATION-2000", and blue rectangular marks that display a tooltip with the population value when hovered. Data is loaded from a remote CSV file using D3's `csv` function.
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.