Skip to main content
100%

Shapes with SVG

✓ Published0🌍 Public
Ffborgomano
Last edited Dec 6, 2020
Created on Dec 5, 2020
Forked from Shapes with SVG

This example displays a horizontal bar chart of country populations as SVG rectangles, using a linear scale for population values and a band scale for country names. The bars are rendered via `d3.selectAll` and `.enter()`, with axes generated through `axisLeft` and `axisBottom`. Data loads from a CSV file and converts population strings to numbers. The chart includes custom tick formatting that abbreviates numbers using `d3.format` and replaces "G" with "B" for billions.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes