Skip to main content
100%

Axes with react and D3

✓ Published1🌍 Public
Ggayatrisridhar
Last edited May 14, 2021
Created on May 11, 2021

This example shows a horizontal bar chart of the top 10 countries by 2020 population, with custom axes rendered as SVG elements. D3 scales (scaleBand, scaleLinear) compute bar positions and sizes, while React manages state and renders ticks, labels, and rects. The code manually generates axis ticks via xScale.ticks() and maps domains, avoiding d3.axisBottom. Data loads from a CSV file using d3.csv.

AI-generated description
MIT Licensed

Similar vizzes