Skip to main content
100%

Fork of Activity 7

✓ Published0🌍 Public
SSwapna1915
Last edited Jul 5, 2023
Created on Jul 3, 2023
Forked from Activity 7

This example shows a horizontal bar chart comparing the 2020 estimated populations of 20 countries, with each bar’s length encoded by population value and labeled along the left axis. The visualization is built with React and D3 v5, using `scaleBand` for the categorical country axis, `scaleLinear` for the population scale, and `format('.2s')` to abbreviate tick labels (e.g., “B” for billions). Data is loaded as CSV via `csv()` from a remote GitHub URL, with numeric values multiplied by 1000, and rendered as SVG `<rect>` elements with tooltips.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes