Skip to main content
100%

Fork of Make a bar chart

✓ Published0🌍 Public
DDing
Last edited Feb 27, 2023
Created on Feb 27, 2023
Forked from Make a bar chart

This example shows a horizontal bar chart ranking the top 10 most populous countries, drawing on population data from a CSV file. The chart displays country names along the y-axis and population values on the x-axis, formatted with tick labels using a compact scale. The visualization uses D3 v7’s `scaleBand` for the categorical y-axis and `scaleLinear` for the quantitative x-axis, with `axisBottom` and `axisLeft` to render axes. SVG rectangles are bound to data via `selectAll` and `enter`, with `csv()` loading the dataset asynchronously into a React-like structure.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes