🌍 Public
Viewing a saved revision (read-only)
0ef9fb1f5bfc499da132660f5f889382
Making a Bar Chart
This example shows a horizontal bar chart of country populations, ranking thirteen nations from China to the Philippines. The bars are rendered as SVG rectangles filled with steel blue, with a left axis displaying country names and a bottom axis showing population counts. The chart uses d3.csv to load the data, d3.scaleLinear and d3.scaleBand for scaling, and d3.axisLeft and d3.axisBottom to generate the axes. Population values are converted from thousands using array methods before rendering.
AI-generated description