activity 6_Task 1
✓ Published0🌍 Public
This example shows a horizontal bar chart ranking 30 countries by their 2020 population, using a dataset loaded from a GitHub-hosted CSV file. React manages the component state, while D3 v5 provides the `scaleBand` and `scaleLinear` functions for positioning bars and axes, and the `format` helper for abbreviating tick labels (e.g., converting “G” to “B”). The SVG is rendered with reusable axis and mark components, each bar displaying a native tooltip via the `<title>` element. The visual design uses green bars, blue axis lines, and a Poppins font.
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.
MIT Licensed