Skip to main content
100%

Refactor Bar chart

✓ Published1🌍 Public
AAlex Stulov
Last edited Jul 13, 2021
Created on Jul 12, 2021
Forked from Bar chart

This bar chart visualizes the population of the top 10 countries in 2020, using horizontally-oriented bars. Built with React and SVG, the example decomposes the visualization into reusable components: `AxisBottom`, `AxisLeft`, and `Marks`. It uses `d3.scaleBand` for the categorical y-axis, `d3.scaleLinear` for the population x-axis, and `d3.max` for domain calculation. Data is loaded asynchronously from a CSV file via a custom `useData` hook, which fetches and parses the UN Population 2019 dataset.

AI-generated description

Mouse follower

MIT Licensed

Similar vizzes