Skip to main content
100%

Activity_6Task_1

✓ Published0🌍 Public
AAbrarb702@gmail.com
Last edited Oct 22, 2024
Created on Oct 22, 2024
Forked from Hello VizHub

This example shows a horizontal bar chart of the populations of 30 countries in 2020, ordered by country name along the y-axis. Each bar’s length encodes the population value, with an axis label reading “POPULATION-2020” and formatted tick values using D3’s `format` function to abbreviate billions as “B”. The visualization uses React components (AxisBottom, AxisLeft, Marks) to render SVG elements, with scales created via `d3.scaleBand` and `d3.scaleLinear`. Data is loaded asynchronously from a remote CSV file using `d3.csv` in the custom `useData` hook, and countries are sliced to the first 30 rows.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes