Skip to main content
100%

Refactored Bar Chart

✓ Published1🌍 Public
KKevin McMorrow
Last edited Sep 25, 2021
Created on Sep 25, 2021

This horizontal bar chart displays the population of the top 10 countries in 2020, with country names on the y-axis and population values on the x-axis. Built with React and D3 v7, it uses `scaleBand` and `scaleLinear` to map data to SVG coordinates. The chart is separated into modular components—`AxisBottom`, `AxisLeft`, and `Marks`—each rendering SVG elements like lines and text. Data is loaded asynchronously from a CSV file via `d3.csv`, and all visual elements are rendered declaratively with React's SVG output.

AI-generated description
MIT Licensed

Similar vizzes