Skip to main content
100%

Making a simple bar chart

✓ Published1🌍 Public
Cchrischism8063
Last edited Jul 19, 2019
Created on Jul 9, 2019

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
MIT Licensed

Similar vizzes