Skip to main content
100%

Refactored Bar Chart

✓ Published1🌍 Public
Rrajamrit-singh
Last edited Mar 17, 2023
Created on Feb 1, 2023
Forked from Axis with React d3

This example shows a horizontal bar chart of population estimates for ten countries using UN Population 2019 data, with a custom tooltip displaying the population value on hover. The visualization is built with React components and D3 v7, leveraging `scaleBand` for the categorical y-axis and `scaleLinear` for the quantitative x-axis. The chart renders as SVG, with reusable axis components (`AxisBottom`, `AxisLeft`) and a `Marks` component drawing the bars, while the data is asynchronously loaded and processed via a custom `useData` hook using `d3.csv`.

AI-generated description

A program that loads in some data

MIT Licensed

Similar vizzes