Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Visualize data in React & D3 - use bar chart

Public visualization

Viewing a saved revision (read-only)

9c974f0626cb4baba2cddd23a191ae09

Visualize data in React & D3 - use bar chart

0 stars1🌍 Public
Ssmile2git
Last edited May 28, 2021
Created on May 27, 2021

This example renders a horizontal bar chart of the top 10 countries by 2020 population, using data fetched from a CSV file of UN population estimates. The React component loads the data with D3’s `csv` utility, then computes scales with `scaleBand` and `scaleLinear`. The SVG output is generated declaratively through React’s JSX syntax, mapping ticks, country labels, and rectangles. The visualization is drawn directly in the browser window, using D3 v5 for data processing and React for rendering.

AI-generated description

Loads data with D3 utilities and uses React to render the data.