Skip to main content
100%

Activity 6

✓ Published0🌍 Public
Pperamranji
Last edited Mar 30, 2025
Created on Mar 30, 2025
Forked from Activity 6

This visualization displays the 2020 populations of 30 countries as a horizontal bar chart, using a band scale for country names and a linear scale for population values. The chart shows bars in light green with blue tick marks on the axes, and includes a tooltip formatted with D3's `format` API to abbreviate large numbers (e.g., "1.2B"). Built with React and D3 v5, the code explicitly uses `scaleBand`, `scaleLinear`, and `max`, while a custom `useData` hook fetches CSV data from a GitHub repository. The SVG is rendered via React components (`AxisBottom`, `AxisLeft`, `Marks`).

AI-generated description
MIT Licensed

Similar vizzes