🌍 Public
Viewing a saved revision (read-only)
ce1c0f8e63c548b1bc711d1f9655a7f1
Activity6_Tutorial1_Rashmitha
This example displays a horizontal bar chart of population figures for 30 countries in 2020, sourced from a GitHub-hosted CSV file. The React-based visualization uses D3 v5’s `scaleBand` and `scaleLinear` to map country names and population values to SVG rectangles, with custom `AxisBottom` and `AxisLeft` components rendering ticks. A tooltip on each bar reveals the exact population, formatted using D3’s `format` function, while green marks and styled axes highlight the data. The chart is rendered entirely as SVG within a React component.
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.