Skip to main content
100%

Activity 7

✓ Published0🌍 Public
HHarshiiiiiiiip
Last edited Jul 5, 2023
Created on Jul 5, 2023
Forked from Hello VizHub

A horizontal bar chart displays the populations of 20 countries for 2020, ranked by country name on the y-axis and population magnitude on the x-axis. Built with React and D3 v5, the visualization uses `scaleBand` for the categorical axis and `scaleLinear` for population values, with SVG `<rect>` elements rendering the bars. Data is loaded asynchronously via `d3.csv` from a GitHub-hosted CSV file, and axis ticks are formatted using `d3.format` to abbreviate large numbers (e.g., converting Giga to Billions). The code includes custom `AxisBottom` and `AxisLeft` components that generate SVG tick marks and labels.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes