Skip to main content
100%

Bar Chart

✓ Published1🌍 Public
MMark Lam
Last edited Jul 20, 2021
Created on Jul 18, 2021

This bar chart displays the top 10 countries by estimated 2020 population, with horizontal bars whose lengths correspond to population values. The React component loads data from a CSV file using d3.csv, then scales the bars with d3.scaleBand for the categorical y-axis and d3.scaleLinear for the quantitative x-axis. Each bar is rendered as an SVG rectangle, with width mapped from the population field. The chart includes a loading state while data is fetched asynchronously.

AI-generated description

Load data with react 3d

MIT Licensed

Similar vizzes