Skip to main content
100%

Refactored Bar Chart

✓ Published1🌍 Public
Aalexandermodell
Last edited Feb 24, 2022
Created on Feb 24, 2022

A horizontal bar chart displays the top 10 countries by population for 2020, using UN population data loaded via D3's `csv` utility. The React app renders SVG rectangles through the `Marks` component, with scales from `d3.scaleBand` and `d3.scaleLinear` positioning bars and axes. Reusable `AxisBottom` and `AxisLeft` components generate tick marks and labels. The chart is built with React 16.9, D3 v7, and SVG rendering, isolating data-loading logic in a custom `useData` hook.

AI-generated description

A program that loads in some data using D3 utilities, and uses React render the data.

MIT Licensed

Similar vizzes