Skip to main content
100%

Axis wit React and D3

✓ Published1🌍 Public
Kkragovic
Last edited Mar 30, 2021
Created on Mar 30, 2021

This example displays a horizontal bar chart of the top 10 countries by 2020 population, using React state to manage data loaded asynchronously with `d3.csv`. The visualization manually constructs axes with `d3.scaleLinear` and `d3.scaleBand`, rendering tick marks, labels, and bars as SVG elements. It leverages React hooks (`useState`, `useEffect`, `useCallback`) to trigger the data fetch and update the chart, while D3 utilities handle scaling and data parsing.

AI-generated description

A program that loads in some data using D3 utilities, and uses React state to keep track of the data.

MIT Licensed

Similar vizzes