Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Refactored Bar chart with React & D3

Public visualization

Fork of Refactored Bar chart with React & D3

0 stars2🌍 Public
Kkhushburajan2015@gmail.com
Last edited Oct 16, 2025
Created on Oct 16, 2025

This fork of the refactored bar chart example uses React with D3 v7 to render a horizontal bar chart of US city populations. The code defines reusable components for axes and marks, using `d3.scaleLinear` and `d3.scaleBand` to map population values and city names, while data is embedded and parsed via `d3.csvParse` from a local CSV string. Bars are drawn as SVG `rect` elements with hover opacity changes, and gridlines are created through a D3 axis call.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed