Skip to main content
100%

Making a Bar Chart

✓ Published0🌍 Public
JJacobU
Last edited Jun 10, 2021
Created on Jun 9, 2021
Forked from HTML Starter

This example demonstrates how to build a horizontal bar chart with D3 v6 in a React-compatible setup, visualizing population data for ten countries. The visualization uses `d3.csv` to load the dataset, `scaleLinear` for the x-axis, and `scaleBand` with padding for the y-axis. SVG rect elements are bound to the data and appended to a group with margins, while `axisLeft` and `axisBottom` render the axes. The chart shows population counts in thousands, with bars styled via CSS in steelblue.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes