🌍 Public
Viewing a saved revision (read-only)
1a56f5ec64e54c9ab652693dc0684b4c
making a bar chart
This example shows a horizontal bar chart comparing the populations of ten countries, with each bar’s length encoded by population and its vertical position by country name. It loads data from a CSV file using `d3.csv`, then renders the chart with D3 v5’s `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` utilities. The bars are drawn as SVG rectangles inside a translated group, with axes appended via `g.call()`. The visualization highlights the stark population differences among the listed nations.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.