Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of React & D3 Vibecoding Starter

Public visualization

Viewing a saved revision (read-only)

35e64e3fefec474fb161ec8da7508190

Fork of React & D3 Vibecoding Starter

0 stars0🌍 Public
NNita
Last edited Jun 4, 2025
Created on Jun 4, 2025

This example shows a simple bar chart of letter frequencies from a small CSV dataset. The chart uses a React component with hooks and a ResizeObserver for responsive dimensions. D3’s scaleBand and scaleLinear create the scales, while axisBottom and axisLeft render axes with gridlines. Clicking a bar toggles a selected state, changing its fill and opacity through transitions. The code integrates D3 selections with React state management, using modular rendering functions for the SVG, title, bars, and data loading.

AI-generated description