Refactored Bar Chart
✓ Published0🌍 Public
This example shows a horizontal bar chart comparing the populations of the top 10 countries for 2020, with each bar’s length mapped to population and labeled by country name on the left axis. Built with React and D3 v5, the chart uses `scaleBand` for the categorical y-axis, `scaleLinear` for the quantitative x-axis, and renders SVG `rect` elements via a custom `Marks` component. Axes are constructed manually from `xScale.ticks()` and `yScale.domain()`, with data loaded asynchronously from a CSV file.
AI-generated descriptionReact Starter code.
MIT Licensed