Skip to main content
100%

Refactored Bar Chart

✓ Published1🌍 Public
Bbakstorage00001
Last edited Feb 4, 2022
Created on Feb 4, 2022

A horizontal bar chart displays population data for ten countries in 2020, loaded from a CSV file hosted on GitHub. The React app uses a custom hook with `d3.csv` to fetch and parse the data, storing it in state. SVG rendering builds the visualization from reusable components: `AxisBottom` creates the linear population scale, `AxisLeft` labels the categorical country bands, and `Marks` draws rectangles using `scaleBand` and `scaleLinear`. The chart updates upon data loading.

AI-generated description

A program that loads in some data using d3 utilities, and uses React state to keep track of the data.

MIT Licensed

Similar vizzes