Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Viewing a saved revision (read-only)

f8298c2920484215bd8798b0410824ea

Making a Bar Chart

0 stars2🌍 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.