Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

making bar chart with react ad d3

Public visualization

Viewing a saved revision (read-only)

542357044a4a403584d123f9eb270792

making bar chart with react ad d3

0 stars1🌍 Public
Wwzhang88
Last edited Nov 23, 2021
Created on Nov 21, 2021
Forked from d3arc to draw

This example shows a horizontal bar chart of UN population data for 2000, loading the top 10 countries from a CSV file. The chart uses React state management to fetch and store the data, then renders SVG rectangles positioned with `d3.scaleBand` and sized with `d3.scaleLinear`. The `d3.csv` function parses the remote dataset, and React's `useEffect` and `useState` hooks handle asynchronous loading and display a loading message before the chart appears.

AI-generated description

a program that load data and