🌍 Public
Viewing a saved revision (read-only)
51d2947b68be43c48249ff22fc1cf97c
Making a barchart
This example shows a horizontal bar chart ranking the populations of ten countries, from China at the top to Mexico at the bottom, scaled to thousands. The visualization uses D3 v5’s `csv` loader to parse the data, `scaleBand` for the y-axis categories, `scaleLinear` and `max` for the x-axis magnitude, and `axisLeft`/`axisBottom` for the ticks. Bars are rendered as SVG `<rect>` elements with a steelblue fill, positioned within a margin-based coordinate system.
AI-generated description