🌍 Public
Viewing a saved revision (read-only)
334c2e91130f4e7eb002213af6c02beb
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