🌍 Public
Viewing a saved revision (read-only)
7c081be831d145b4b71c35f93760526d
Making a simple bar chart
This example displays a horizontal bar chart ranking 24 countries by their 2020 populations, with values read from a CSV file and scaled linearly along the x-axis while countries are positioned on a categorical band scale. The SVG rendering uses D3 v5’s `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to construct the axes, while bars are appended as `rect` elements and styled with steelblue fills. Population figures are multiplied by 1,000 after loading to reflect actual counts.
AI-generated description