🌍 Public
Viewing a saved revision (read-only)
b12ca67e1881474b902a845b59c87dde
Making a bar chart
This example shows a bar chart of country populations using a static CSV dataset loaded with `d3.csv`. The bars are drawn as SVG rectangles within a fixed 960×500 viewport, with population values converted from thousands to absolute numbers via a `+` unary operator. The chart relies on D3 v5’s `select` and `csv` functions to fetch and parse the data, while the rendering is handled entirely through SVG elements created without scales or axes, leaving the raw data values to determine bar heights.
AI-generated descriptionReact Starter code.