Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Activity 7

Public visualization

Viewing a saved revision (read-only)

80c8c2629da9419e9da36f1da10a5042

Fork of Activity 7

0 stars0🌍 Public
Ddabbararakshitha@gmail.com
Last edited Apr 4, 2025
Created on Apr 4, 2025
Forked from Activity 7

This visualization shows the top 30 countries by 2020 population as a horizontal bar chart, with the x-axis formatted in billions using d3's `format` function. The chart uses React and d3.v5's `scaleBand` and `scaleLinear` to position bars, while `AxisBottom` and `AxisLeft` render tick marks. Data is loaded asynchronously via `useData` with d3's `csv` parser from a GitHub-hosted CSV file. SVG rectangles in `Marks` display the values, with native `<title>` elements providing hover tooltips.

AI-generated description