Skip to main content
100%

Fork of Activity 6_Question 2

✓ Published1🌍 Public
HHarshita Vairagade
Last edited Apr 13, 2024
Created on Apr 13, 2024

This example presents a horizontal bar chart of population figures for 20 countries in 2020, arranged from top to bottom by country name. The chart uses React components to render SVG elements, with D3 v5’s `scaleBand` and `scaleLinear` for positioning bars and `format` to abbreviate axis tick labels. Data is loaded from a remote CSV using D3’s `csv` function, with population values computed by multiplying the 2010 column by 1000. Bars include a native SVG `<title>` tooltip showing the formatted population value.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes