Skip to main content
100%

activity6question-1

✓ Published0🌍 Public
Vvaishnavi6gan@gmail.com
Last edited Apr 3, 2024
Created on Apr 3, 2024
Forked from Hello VizHub

This example shows a horizontal bar chart comparing the populations of ten countries from the year 2000, with a green bar representing each country’s population in millions. The visualization uses React to render SVG elements, with D3’s `scaleBand` and `scaleLinear` defining the y- and x-axes, respectively. Data is loaded from a remote CSV file using D3’s `csv` method, and axis labels are formatted using D3’s `format` function to abbreviate values (e.g., converting billions to "B"). Tooltips provide exact population values on hover via the SVG `title` element.

AI-generated description
MIT Licensed

Similar vizzes