Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Refactor Bar Chart woth React & D3

Public visualization

Fork of Refactor Bar Chart woth React & D3

0 stars0🌍 Public
Bbassra
Last edited Jan 13, 2023
Created on Jan 13, 2023

This visualization presents a horizontal bar chart of the ten most populous countries, sourced from the UN’s 2019 population dataset, using React to manage the component structure and D3’s `scaleBand` and `scaleLinear` to compute the layout. The code renders bars as raw SVG `<rect>` elements, with axes generated as SVG `<line>` and `<text>` elements via custom `AxisBottom` and `AxisLeft` components. Data loading is handled through a custom `useData` hook that fetches and parses the remote CSV file with D3’s `csv` function.

AI-generated description

A Pathatic bar chart with React & d3.

Comments

Sign in to join the discussion.

MIT Licensed