🌍 Public
Viewing a saved revision (read-only)
9d4d6c7654d141e8a9cb315f4b817a35
Making a Bar Chart
This example shows a horizontal bar chart of the populations of the ten most populous countries, ordered from largest to smallest. It uses D3 v5 to load data from a CSV file and render the visualization as SVG. The code explicitly calls `scaleLinear` and `scaleBand` to create the x and y scales, `axisLeft` and `axisBottom` to generate the axes, and uses `select` to target the SVG element. The bars are colored steel blue via CSS, and the population values are transformed by multiplying by 1000 before rendering.
AI-generated description