Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Pathetic Bar Chart

Public visualization

Pathetic Bar Chart

0 stars1🌍 Public
CChira Cezara Victoria
Last edited Oct 2, 2021
Created on Oct 2, 2021
Forked from CSS Colors Pie

This example displays a horizontal bar chart of the top ten countries by 2020 population from a UN dataset. The bars are rendered as SVG rectangles without labels or axes, appearing intentionally minimal. The code loads data with `d3.csv`, scales it using `scaleBand` and `scaleLinear`, and renders the chart through React components. The visualization relies on React’s `useState` and `useEffect` hooks to asynchronously fetch and update the data, with D3 version 5 handling the scaling logic.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed