Skip to main content
100%

D3 Bar Chart

✓ Published0🌍 Public
Ttim10133222
Last edited Jan 3, 2023
Created on Jan 3, 2023
Forked from D3 Color pie

This interactive bar chart displays United Nations population estimates for 2020 across ten countries, with horizontal bars scaled proportionally using d3.scaleLinear and d3.scaleBand. Built with React and D3 v5, it loads CSV data via d3.csv, converts population strings to numbers, and renders SVG rectangles. The chart updates reactively through React hooks (useState, useEffect, useCallback) asynchronously fetching data from a GitHub gist URL.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes