Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Axes with React & D3

Public visualization

Axes with React & D3

0 stars1🌍 Public
CCyc-Evelyn
Last edited Oct 12, 2020
Created on Oct 12, 2020
Forked from Hello VizHub

This example shows a horizontal bar chart of population data for the top 10 countries in 2020, with axes drawn manually using React components. The code loads the UN Population dataset via `d3.csv`, then uses `scaleBand` and `scaleLinear` from D3 to position bars and ticks, while React state and `useEffect` manage data loading. SVG elements like `<rect>` and `<line>` render the bars and axis ticks, with text labels positioned via D3 scales, all inside a React component tree rendered to the DOM.

AI-generated description

A program that loads in some data using D3 utilities, and uses React state to render the data. //ep20

Comments

Sign in to join the discussion.

MIT Licensed