Skip to main content
100%

making a bar chart

✓ Published3🌍 Public
Nnexus1058
Last edited Dec 12, 2020
Created on Dec 5, 2020
Forked from shapes with svg

This visualization displays population data for the ten most populous countries using a horizontal bar chart encoded as SVG rectangles. The chart uses D3 v6’s `csv` loader to parse data, with population values scaled linearly via `scaleLinear` and country names mapped to bands with `scaleBand`. Axes are generated using `axisLeft`, while margins define the plotting area. The bars’ widths and vertical positions are computed from the scaled domains, and the data is multiplied by 1000 to represent actual population figures.

AI-generated description
MIT Licensed

Similar vizzes