🌍 Public
Viewing a saved revision (read-only)
e94b2b50999b48528e4378e406689c1f
Making a Bar Chart
This example shows a horizontal bar chart of population data for ten countries, with bars rendered in steel blue and axes labeled with country names and population values. It imports data from a CSV file using `d3.csv` and renders SVG rectangles scaled with `scaleLinear` and `scaleBand`. The chart uses `axisLeft` and `axisBottom` to display tick marks, and applies margins via a group transform. Population values are converted from thousands to absolute numbers before rendering.
AI-generated description