Refactored Bar Chart
✓ Published1🌍 Public
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 descriptionA program that loads in some data
MIT Licensed