🌍 Public
Viewing a saved revision (read-only)
54758ff209ef40b491e0a75d246956a4
Activity 8 Hello VizHub
This example displays a horizontal bar chart of population data for 30 countries in 2020, with country names on the y-axis and population values on the x-axis. The visualization uses React with D3 v5’s `scaleBand` and `scaleLinear` for positioning, and renders SVG rectangles via the `Marks` component. Data is loaded asynchronously from a CSV file using `d3.csv`, with axes generated through custom `AxisBottom` and `AxisLeft` components. Tooltips appear on each bar 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.