Skip to main content
100%

Making a Bar Chart

✓ Published2🌍 Public
Eegrebing
Last edited Sep 20, 2020
Created on Sep 19, 2020

This horizontal bar chart displays the population of the world's most populous countries, using a data.csv file with country names and raw population figures. The chart renders as SVG elements, with each country represented by a rectangular bar scaled by a linear population axis. The visualization employs D3's `scaleLinear` and `scaleBand` for scaling, `axisLeft` and `axisBottom` to draw the axes, and a custom tick formatter that abbreviates large numbers. The code reads the CSV asynchronously, multiplies the population values by 1000, and appends the bars to the SVG group.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes