Making A Bar Chart
✓ Published1🌍 Public
This example displays a horizontal bar chart of population figures for ten countries, from China down to Mexico, using a clean SVG rendering with steel-blue bars. The visualization is built with D3 v6, loading the dataset via `d3.csv` and scaling the population values by one thousand before rendering. It employs `scaleLinear` for the population axis and `scaleBand` for the categorical country labels, with axes generated by `axisLeft` and `axisBottom`. The layout applies explicit margins and transforms to position the chart within a fixed 960-by-500 viewport.
AI-generated descriptionMIT Licensed