Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Pathetic Bar chart

Public visualization

Pathetic Bar chart

0 stars1🌍 Public
Sstephanie0215
Last edited Sep 29, 2022
Created on Sep 28, 2022

This example displays a bar chart of the ten most populous countries, using horizontal bars to compare 2020 population estimates. The visualization loads data from a CSV file via `d3.csv` and manages it with React state, employing `useState` and `useEffect` to trigger the asynchronous fetch. The chart uses `scaleBand` for the categorical y-axis, `scaleLinear` for the continuous x-axis, and renders the bars as SVG `<rect>` elements. A loading message appears until the data is ready.

AI-generated description

A program that loads in some data using D3 utilities, and uses REACT state to keep track of the data.

Comments

Sign in to join the discussion.

MIT Licensed