Making a Bar Chart
✓ Published4🌍 Public
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 descriptionMIT Licensed