🌍 Public
Viewing a saved revision (read-only)
c334a4d2c06f4e7bb1ce35df65e9c0bf
Making a Bar Chart
This example shows a horizontal bar chart of population by country, with bars scaled linearly along the x-axis and sorted alphabetically along the y-axis. The code uses d3.csv to load the data, d3.scaleLinear and d3.scaleBand to compute positions, and d3.axisLeft and d3.axisBottom to render the axes via SVG. The bars are appended as SVG rect elements with a steelblue fill.
AI-generated description