🌍 Public
Viewing a saved revision (read-only)
e8d0cde4efd0483f89769fbf85dc0415
making a barchart
This example shows a horizontal bar chart of country populations, comparing 12 nations from a CSV dataset. The bars are rendered as SVG rectangles, with country names on the y-axis and population values on the x-axis. Using d3’s `csv` loader, the data is parsed and scaled with `scaleLinear` and `scaleBand`, while axes are generated via `axisLeft` and `axisBottom`. Rectangles are appended to the SVG group with attributes mapped from the scales, and the chart is styled with a steelblue fill.
AI-generated description