Skip to main content
100%

Making a Bar Chart

✓ Published1🌍 Public
TTsen Hsieh
Last edited Nov 6, 2022
Created on Sep 27, 2022

This example presents a horizontal bar chart of population counts for eight countries, drawn as SVG rectangles. The chart uses D3 v7's `scaleLinear` and `scaleBand` to map population values and country names to positions, with axes formatted using `format` and custom tick labels. Data is loaded from a CSV file via `csv()`, and the bars are rendered by appending `rect` elements to an SVG group.

AI-generated description
MIT Licensed

Similar vizzes