🌍 Public
Viewing a saved revision (read-only)
e064c2501dca4c6bbb0751cdfed6bdb9
Making BarChart
This example shows a horizontal bar chart of the top 10 most crowded countries, ranked by population on a linear scale. The code uses D3 v5 to load CSV data, apply a linear scale for the x-axis and a band scale for the y-axis, and render SVG rectangles for bars. It formats tick labels with `d3.format` to abbreviate large numbers (e.g., "G" replaced with "B") and draws gridlines using the axis’s tick size.
AI-generated description