🌍 Public
Viewing a saved revision (read-only)
1207d7142dee413f899305e54c399d94
Activity question 1
This example renders a horizontal bar chart displaying the population figures for ten countries in the year 2000, with the largest populations extending furthest to the right. The visualization is built using React and the D3.js library, using `scaleBand` for the categorical y-axis and `scaleLinear` for the quantitative x-axis. Axes are constructed via the custom local `AxisBottom` and `AxisLeft` modules, while the bars are drawn as SVG rectangles with a hover tooltip showing the formatted value. Data is loaded asynchronously from a specified 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.