Skip to main content
100%

D3 Bar Chart

✓ Published0🌍 Public
SSiddharthMittal07
Last edited Feb 20, 2022
Created on Feb 20, 2022
Forked from React Starter

This example shows a horizontal bar chart of the ten most populous countries for 2020, based on UN population data loaded from a CSV file. Each bar's length represents the population value, with country names mapped along the vertical axis. The visualization is built with React and D3 v7, using `d3.csv` for data loading, `d3.scaleLinear` for the x-axis, and `d3.scaleBand` for the categorical y-axis. Bars are rendered as SVG `<rect>` elements within a React component, with dimensions computed from the scales.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes