Making a simple bar chart
✓ Published1🌍 Public
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 descriptionMIT Licensed