🌍 Public
RamyaPutta
This example displays the population of ten countries in 2019 using a horizontal bar chart rendered as SVG. It fetches CSV data via `d3.csv` and uses React hooks (`useState`, `useEffect`) to load and manage the dataset. The chart employs `scaleBand` for the y-axis, `scaleLinear` for the x-axis, and custom tick rendering with grid lines and labels. Bars are drawn as green `<rect>` elements, with axes manually created using D3’s scale functions rather than `axisLeft` or `axisBottom`.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed






![[SR] Bar Chart with React & D3](/viz/713b08c960bf4b58957bae057f88be02/social-image.png?v=7befacd173dd4f1d805053cc44e1c3e2)

Comments
Sign in to join the discussion.