🌍 Public
Viewing a saved revision (read-only)
64d19ec2ccd64cafa05f4ae9b82c50b0
Activity-6 Task-1
This example shows a horizontal bar chart of 2020 population data for 30 countries, ranked from largest to smallest at the top. The SVG visualization uses React components to render the chart, with D3 v5’s `scaleBand` for the categorical y-axis and `scaleLinear` for the continuous x-axis. Bar lengths encode population values, and hovering over a bar reveals its formatted value via a tooltip. Axes are drawn with custom `AxisBottom` and `AxisLeft` components that generate tick marks and labels, while the data is fetched from a 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.