Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Rendering Data with React & D3

Public visualization

Viewing a saved revision (read-only)

82ecb392a31e48e5957fb44790df9521

Fork of Rendering Data with React & D3

0 stars1🌍 Public
Gguptambergatech
Last edited Jan 9, 2022
Created on Jan 9, 2022

This example shows a bar chart of population data for the top 10 countries in 2020, loaded from a CSV file and rendered as SVG rectangles. The app uses React hooks (useState, useEffect) to fetch and store the data, then maps it to bars with d3.scaleBand for the y-axis and d3.scaleLinear for the x-axis. Bars are positioned using the yScale and sized by xScale on population values, with the chart filling the entire window.

AI-generated description

Smiley face implementation with React.