Skip to main content
100%

Refactored Bar chart with React & D3

✓ Published3🌍 Public
MMark Simpson
Last edited Oct 15, 2025
Created on Oct 10, 2025

This example shows a horizontal bar chart of the top 10 most populous countries, with population values on the x-axis and country names on the y-axis. Built with React components that render SVG elements, it uses `d3.scaleBand` for the y-axis categories and `d3.scaleLinear` for the x-axis range. The data is loaded with `d3.csv` from a GitHub-hosted dataset, and axes are drawn using custom React components that generate `<line>` and `<text>` elements.

AI-generated description
MIT Licensed

Similar vizzes