Axes with React & D3
✓ Published1🌍 Public
This example shows a horizontal bar chart of the top 10 countries by 2020 population, with axes labels rendered as individual SVG elements. It uses React’s useState and useEffect hooks to load CSV data from a GitHub gist, then builds scales with d3.scaleBand and d3.scaleLinear. Axes ticks are generated manually via d3’s tick() method, with each tick and label positioned using SVG transforms, while bars are drawn as rect elements.
AI-generated descriptionA program that follows your mouse with a circle.
MIT Licensed