🌍 Public
Viewing a saved revision (read-only)
92e7f81e865c4d50bd927b27c15beeeb
Making a Bar chart
This example shows a horizontal bar chart of country populations, with bars scaled linearly to population size and country labels along the y-axis. The visualization loads data from a CSV file using `d3.csv`, then renders SVG rectangles with `d3.scaleLinear` and `d3.scaleBand` for positioning. Axes are added via `d3.axisLeft` and `d3.axisBottom`, while margins and inner dimensions are manually calculated to place the chart within an SVG canvas.
AI-generated description